PHP Интерфейс eZ\Publish\Core\MVC\Symfony\View\ViewManagerInterface

Показать файл Открыть проект Примеры использования интерфейса

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

Метод Описание
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.

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

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

$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.
Результат string

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

$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.
Результат string

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

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
Результат string

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

$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.
Результат string