protected function resolveView()
{
$viewsConfiguration = $this->viewConfigurationManager->getViewConfiguration($this->request);
$viewObjectName = $this->defaultViewImplementation;
if (!empty($this->defaultViewObjectName)) {
$viewObjectName = $this->defaultViewObjectName;
}
$viewObjectName = $this->resolveViewObjectName() ?: $viewObjectName;
if (isset($viewsConfiguration['viewObjectName'])) {
$viewObjectName = $viewsConfiguration['viewObjectName'];
}
if (!is_a($viewObjectName, ViewInterface::class, true)) {
throw new ViewNotFoundException(sprintf('View class has to implement ViewInterface but "%s" in action "%s" of controller "%s" does not.', $viewObjectName, $this->request->getControllerActionName(), get_class($this)), 1355153188);
}
$viewOptions = isset($viewsConfiguration['options']) ? $viewsConfiguration['options'] : [];
$view = $viewObjectName::createWithOptions($viewOptions);
return $view;
}