eZ\Publish\Core\MVC\Symfony\View\Manager::renderContentView PHP Method

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
    public function renderContentView(View $view, array $defaultParams = array())
    {
        $defaultParams['viewbaseLayout'] = $this->viewBaseLayout;
        $view->addParameters($defaultParams);
        $this->eventDispatcher->dispatch(MVCEvents::PRE_CONTENT_VIEW, new PreContentViewEvent($view));
        $templateIdentifier = $view->getTemplateIdentifier();
        $params = $view->getParameters();
        if ($templateIdentifier instanceof \Closure) {
            return $templateIdentifier($params);
        }
        return $this->templateEngine->render($templateIdentifier, $params);
    }