protected function _initializeViewObject($class, $function, $parameters = null, $viewsChain = null)
    {
        $classKey = Registry::getControllerClassNameResolver()->getIdByClassName($class);
        $classKey = !is_null($classKey) ? $classKey : $class; //fallback

        /** @var FrontendController $view */
        $view = oxNew($class);

        $view->setClassKey($classKey);
        $view->setFncName($function);
        $view->setViewParameters($parameters);

        \OxidEsales\Eshop\Core\Registry::getConfig()->setActiveView($view);

        $this->onViewCreation($view);

        $view->init();

        return $view;
    }