PHP 클래스 Jarves\ContentRender

파일 보기 프로젝트 열기: jarves/jarves 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$contents array Cache of the current contents stage.

보호된 프로퍼티들

프로퍼티 타입 설명
$types Jarves\ContentTypes\AbstractType[]

공개 메소드들

메소드 설명
__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 %}.

보호된 메소드들

메소드 설명
filterContentsForAccess ( Content[] $contents ) : array Filters $contents and returns only $content items which have valid access. (is visible, accessible by current user etc)

메소드 상세

__construct() 공개 메소드

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 addType ( string $type, AbstractType $contentType )
$type string
$contentType Jarves\ContentTypes\AbstractType

filterContentsForAccess() 보호된 메소드

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[]
리턴 array

getContentTypes() 공개 메소드

public getContentTypes ( ) : AbstractType[]
리턴 Jarves\ContentTypes\AbstractType[]

getSlotContents() 공개 메소드

public getSlotContents ( integer $nodeId, integer $slotId ) : Content[]
$nodeId integer
$slotId integer
리턴 Jarves\Model\Content[]

getTypeRenderer() 공개 메소드

public getTypeRenderer ( string $type ) : AbstractType
$type string
리턴 Jarves\ContentTypes\AbstractType

renderContent() 공개 메소드

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

renderContents() 공개 메소드

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

renderSingleSlot() 공개 메소드

public renderSingleSlot ( integer $nodeId = null, integer $slotId = 1, array $params = [] ) : string
$nodeId integer
$slotId integer
$params array
리턴 string

renderSlot() 공개 메소드

public renderSlot ( integer $nodeId = null, integer $slotId = 1, array $params = [] ) : string
$nodeId integer
$slotId integer
$params array
리턴 string

renderSlotContents() 공개 메소드

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

프로퍼티 상세

$contents 공개적으로 프로퍼티

Cache of the current contents stage.
public array $contents
리턴 array

$types 보호되어 있는 프로퍼티

protected AbstractType[],Jarves\ContentTypes $types
리턴 Jarves\ContentTypes\AbstractType[]