eZPublishCommunityProject  2013.5
eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface Interface Reference
+ Inheritance diagram for eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface:

Public Member Functions

 renderBlock (Block $block, $parameters=array())
 Renders $block by selecting the right template. More...
 
 renderContent (Content $content, $viewType=ViewManagerInterface::VIEW_TYPE_FULL, $parameters=array())
 Renders $content by selecting the right template. More...
 
 renderContentView (ContentViewInterface $view, array $defaultParams=array())
 Renders passed ContentView object via the template engine. More...
 
 renderLocation (Location $location, $viewType=ViewManagerInterface::VIEW_TYPE_FULL, $parameters=array())
 Renders $location by selecting the right template for $viewType. More...
 

Public Attributes

const VIEW_TYPE_FULL = 'full'
 
const VIEW_TYPE_LINE = 'line'
 

Member Function Documentation

eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface::renderBlock ( Block  $block,
  $parameters = array() 
)

Renders $block by selecting the right template.

$block will be injected in the selected template.

Parameters
\eZ\Publish\Core\FieldType\Page\Parts\Block$block
array$parametersParameters 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.
Exceptions
\RuntimeException
Returns
string

Implemented in eZ\Publish\Core\MVC\Symfony\View\Manager.

eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface::renderContent ( Content  $content,
  $viewType = ViewManagerInterface::VIEW_TYPE_FULL,
  $parameters = array() 
)

Renders $content by selecting the right template.

$content will be injected in the selected template.

Parameters
\eZ\Publish\API\Repository\Values\Content\Content$content
string$viewTypeVariation of display for your content. Default is 'full'.
array$parametersParameters 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.
Exceptions
\RuntimeException
Returns
string

Implemented in eZ\Publish\Core\MVC\Symfony\View\Manager.

eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface::renderContentView ( ContentViewInterface  $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
\eZ\Publish\Core\MVC\Symfony\View\ContentViewInterface$view
array$defaultParams
Returns
string

Implemented in eZ\Publish\Core\MVC\Symfony\View\Manager.

eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface::renderLocation ( Location  $location,
  $viewType = ViewManagerInterface::VIEW_TYPE_FULL,
  $parameters = array() 
)

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

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

Parameters
\eZ\Publish\API\Repository\Values\Content\Location$location
string$viewTypeVariation of display for your content. Default is 'full'.
array$parametersParameters 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.
Exceptions
\RuntimeException
Returns
string

Implemented in eZ\Publish\Core\MVC\Symfony\View\Manager.

Member Data Documentation

const eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface::VIEW_TYPE_FULL = 'full'
const eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface::VIEW_TYPE_LINE = 'line'

The documentation for this interface was generated from the following file: