PHP Class Jarves\ContentRender

Afficher le fichier Open project: jarves/jarves Class Usage Examples

Méthodes publiques

Свойство Type Description
$contents array Cache of the current contents stage.

Protected Properties

Свойство Type Description
$types Jarves\ContentTypes\AbstractType[]

Méthodes publiques

Méthode Description
__construct ( Jarves $jarves, StopwatchHelper $stopwatch, EditMode $editMode, Cacher $cacher, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, PageStack $pageStack, Symfony\Component\Templating\EngineInterface $templating )
addType ( string $type, AbstractType $contentType )
getContentTypes ( ) : AbstractType[]
getSlotContents ( integer $nodeId, integer $slotId ) : Content[]
getTypeRenderer ( string $type ) : AbstractType
renderContent ( Jarves\Model\ContentInterface $content, array $parameters = [] ) : string Build HTML for given content.
renderContents ( Content[] $contents ) : string Renders all Content elements into html.
renderSingleSlot ( integer $nodeId = null, integer $slotId = 1, array $params = [] ) : string
renderSlot ( integer $nodeId = null, integer $slotId = 1, array $params = [] ) : string
renderSlotContents ( array $contents, array $slotProperties ) : string | null Build HTML for given contents, used in {% contents 1 %}.

Méthodes protégées

Méthode Description
filterContentsForAccess ( Content[] $contents ) : array Filters $contents and returns only $content items which have valid access. (is visible, accessible by current user etc)

Method Details

__construct() public méthode

public __construct ( Jarves $jarves, StopwatchHelper $stopwatch, EditMode $editMode, Cacher $cacher, Symfony\Component\EventDispatcher\EventDispatcherInterface $eventDispatcher, PageStack $pageStack, Symfony\Component\Templating\EngineInterface $templating )
$jarves Jarves
$stopwatch StopwatchHelper
$editMode EditMode
$cacher Jarves\Cache\Cacher
$eventDispatcher Symfony\Component\EventDispatcher\EventDispatcherInterface
$pageStack PageStack
$templating Symfony\Component\Templating\EngineInterface

addType() public méthode

public addType ( string $type, AbstractType $contentType )
$type string
$contentType Jarves\ContentTypes\AbstractType

filterContentsForAccess() protected méthode

Filters $contents and returns only $content items which have valid access. (is visible, accessible by current user etc)
protected filterContentsForAccess ( Content[] $contents ) : array
$contents Jarves\Model\Content[]
Résultat array

getContentTypes() public méthode

public getContentTypes ( ) : AbstractType[]
Résultat Jarves\ContentTypes\AbstractType[]

getSlotContents() public méthode

public getSlotContents ( integer $nodeId, integer $slotId ) : Content[]
$nodeId integer
$slotId integer
Résultat Jarves\Model\Content[]

getTypeRenderer() public méthode

public getTypeRenderer ( string $type ) : AbstractType
$type string
Résultat Jarves\ContentTypes\AbstractType

renderContent() public méthode

Build HTML for given content.
public renderContent ( Jarves\Model\ContentInterface $content, array $parameters = [] ) : string
$content Jarves\Model\ContentInterface
$parameters array
Résultat string

renderContents() public méthode

Renders all Content elements into html.
public renderContents ( Content[] $contents ) : string
$contents Jarves\Model\Content[]
Résultat string generated html

renderSingleSlot() public méthode

public renderSingleSlot ( integer $nodeId = null, integer $slotId = 1, array $params = [] ) : string
$nodeId integer
$slotId integer
$params array
Résultat string

renderSlot() public méthode

public renderSlot ( integer $nodeId = null, integer $slotId = 1, array $params = [] ) : string
$nodeId integer
$slotId integer
$params array
Résultat string

renderSlotContents() public méthode

Build HTML for given contents, used in {% contents 1 %}.
public renderSlotContents ( array $contents, array $slotProperties ) : string | null
$contents array
$slotProperties array
Résultat string | null

Property Details

$contents public_oe property

Cache of the current contents stage.
public array $contents
Résultat array

$types protected_oe property

protected AbstractType[],Jarves\ContentTypes $types
Résultat Jarves\ContentTypes\AbstractType[]