PHP Class 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 }
Inheritance: 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
Mostra file Open project: ezsystems/ezpublish-kernel Class Usage Examples

Public Methods

Method Description
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 )

Protected Methods

Method Description
getInternalParameters ( )

Method Details

getContent() public method

Returns the Content.
public getContent ( ) : eZ\Publish\API\Repository\Values\Content\Content
return eZ\Publish\API\Repository\Values\Content\Content

getInternalParameters() protected method

protected getInternalParameters ( )

getLocation() public method

public getLocation ( ) : eZ\Publish\API\Repository\Values\Content\Location
return eZ\Publish\API\Repository\Values\Content\Location

isEmbed() public method

Is the view an embed or not.
public isEmbed ( ) : boolean
return boolean True if the view is an embed, false if it is not.

setContent() public method

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

setIsEmbed() public method

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

setLocation() public method

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