PHP Класс eZ\Publish\Core\MVC\Symfony\View\ContentView

Holds the path to the template to be rendered by the view manager and the parameters to inject in it. The template path can be a closure. In that case, the view manager will invoke it instead of loading a template. $parameters will be passed to the callable in addition to the Content or Location object (depending on the context). The prototype of the closure must be : namespace Foo; use eZ\Publish\API\Repository\Values\Content\ContentInfo; use eZ\Publish\API\Repository\Values\Content\Location; For a content function ( ContentInfo $contentInfo, array $parameters = array() ) { Do something to render Must return a string to display } For a location function ( Location $location, array $parameters = array() ) { Do something to render Must return a string to display }
Наследование: extends eZ\Publish\Core\MVC\Symfony\View\BaseView, implements eZ\Publish\Core\MVC\Symfony\View\View, implements eZ\Publish\Core\MVC\Symfony\View\ContentValueView, implements eZ\Publish\Core\MVC\Symfony\View\LocationValueView, implements eZ\Publish\Core\MVC\Symfony\View\EmbedView, implements eZ\Publish\Core\MVC\Symfony\View\CachableView
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
getContent ( ) : eZ\Publish\API\Repository\Values\Content\Content Returns the Content.
getLocation ( ) : eZ\Publish\API\Repository\Values\Content\Location
isEmbed ( ) : boolean Is the view an embed or not.
setContent ( eZ\Publish\API\Repository\Values\Content\Content $content )
setIsEmbed ( boolean $value ) Sets the value as embed / not embed.
setLocation ( eZ\Publish\API\Repository\Values\Content\Location $location )

Защищенные методы

Метод Описание
getInternalParameters ( )

Описание методов

getContent() публичный Метод

Returns the Content.
public getContent ( ) : eZ\Publish\API\Repository\Values\Content\Content
Результат eZ\Publish\API\Repository\Values\Content\Content

getInternalParameters() защищенный Метод

protected getInternalParameters ( )

getLocation() публичный Метод

public getLocation ( ) : eZ\Publish\API\Repository\Values\Content\Location
Результат eZ\Publish\API\Repository\Values\Content\Location

isEmbed() публичный Метод

Is the view an embed or not.
public isEmbed ( ) : boolean
Результат boolean True if the view is an embed, false if it is not.

setContent() публичный Метод

public setContent ( eZ\Publish\API\Repository\Values\Content\Content $content )
$content eZ\Publish\API\Repository\Values\Content\Content

setIsEmbed() публичный Метод

Sets the value as embed / not embed.
public setIsEmbed ( boolean $value )
$value boolean

setLocation() публичный Метод

public setLocation ( eZ\Publish\API\Repository\Values\Content\Location $location )
$location eZ\Publish\API\Repository\Values\Content\Location