eZ\Publish\Core\MVC\Symfony\View\Provider\Configured::buildContentView PHP Method

buildContentView() protected method

Builds a ContentView object from $viewConfig.
protected buildContentView ( array $viewConfig ) : ContentView
$viewConfig array
return eZ\Publish\Core\MVC\Symfony\View\ContentView
    protected function buildContentView(array $viewConfig)
    {
        $view = new ContentView();
        $view->setConfigHash($viewConfig);
        if (isset($viewConfig['template'])) {
            $view->setTemplateIdentifier($viewConfig['template']);
        }
        if (isset($viewConfig['controller'])) {
            $view->setControllerReference(new ControllerReference($viewConfig['controller']));
        }
        if (isset($viewConfig['params']) && is_array($viewConfig['params'])) {
            $view->addParameters($viewConfig['params']);
        }
        return $view;
    }