Interface

eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface

interface ViewManagerInterface

Constants

VIEW_TYPE_FULL

VIEW_TYPE_LINE

Methods

string renderContent(Content $content, string $viewType = self::VIEW_TYPE_FULL, array $parameters = array())

Renders $content by selecting the right template.

string renderLocation(Location $location, string $viewType = self::VIEW_TYPE_FULL, array $parameters = array())

Renders $location by selecting the right template for $viewType.

string renderBlock(Block $block, array $parameters = array())

Renders $block by selecting the right template.

string renderContentView(View $view, array $defaultParams = array())

Renders passed ContentView object via the template engine.

Details

at line 34
public string renderContent(Content $content, string $viewType = self::VIEW_TYPE_FULL, array $parameters = array())

Renders $content by selecting the right template.

$content will be injected in the selected template.

Parameters

Content $content
string $viewType Variation of display for your content. Default is 'full'.
array $parameters Parameters to pass to the template called to render the view. By default, it's empty. 'content' entry is reserved for the Content that is rendered.

Return Value

string

Exceptions

RuntimeException

at line 51
public string renderLocation(Location $location, string $viewType = self::VIEW_TYPE_FULL, array $parameters = array())

Renders $location by selecting the right template for $viewType.

$content and $location will be injected in the selected template.

Parameters

Location $location
string $viewType Variation of display for your content. Default is 'full'.
array $parameters Parameters to pass to the template called to render the view. By default, it's empty. 'location' and 'content' entries are reserved for the Location (and its Content) that is viewed.

Return Value

string

Exceptions

RuntimeException

at line 66
public string renderBlock(Block $block, array $parameters = array())

Renders $block by selecting the right template.

$block will be injected in the selected template.

Parameters

Block $block
array $parameters Parameters to pass to the template called to render the view. By default, it's empty. 'block' entry is reserved for the Block that is viewed.

Return Value

string

Exceptions

RuntimeException

at line 77
public string renderContentView(View $view, array $defaultParams = array())

Renders passed ContentView object via the template engine.

If $view's template identifier is a closure, then it is called directly and the result is returned as is.

Parameters

View $view
array $defaultParams

Return Value

string