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

Datei anzeigen Open project: ezsystems/ezpublish-kernel Interface Usage Examples

Public Methods

Method Description
renderBlock ( Block $block, array $parameters = [] ) : string Renders $block by selecting the right template.
renderContent ( eZ\Publish\API\Repository\Values\Content\Content $content, string $viewType = self::VIEW_TYPE_FULL, array $parameters = [] ) : string Renders $content by selecting the right template.
renderContentView ( eZ\Publish\Core\MVC\Symfony\View\View $view, array $defaultParams = [] ) : string Renders passed ContentView object via the template engine.
renderLocation ( eZ\Publish\API\Repository\Values\Content\Location $location, string $viewType = self::VIEW_TYPE_FULL, array $parameters = [] ) : string Renders $location by selecting the right template for $viewType.

Method Details

renderBlock() public method

$block will be injected in the selected template.
public renderBlock ( Block $block, array $parameters = [] ) : string
$block eZ\Publish\Core\FieldType\Page\Parts\Block
$parameters array 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 string

renderContent() public method

$content will be injected in the selected template.
public renderContent ( eZ\Publish\API\Repository\Values\Content\Content $content, string $viewType = self::VIEW_TYPE_FULL, array $parameters = [] ) : string
$content eZ\Publish\API\Repository\Values\Content\Content
$viewType string Variation of display for your content. Default is 'full'.
$parameters array 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 string

renderContentView() public method

If $view's template identifier is a closure, then it is called directly and the result is returned as is.
public renderContentView ( eZ\Publish\Core\MVC\Symfony\View\View $view, array $defaultParams = [] ) : string
$view eZ\Publish\Core\MVC\Symfony\View\View
$defaultParams array
return string

renderLocation() public method

$content and $location will be injected in the selected template.
public renderLocation ( eZ\Publish\API\Repository\Values\Content\Location $location, string $viewType = self::VIEW_TYPE_FULL, array $parameters = [] ) : string
$location eZ\Publish\API\Repository\Values\Content\Location
$viewType string Variation of display for your content. Default is 'full'.
$parameters array 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 string