/**
  * Allows the widget template root path to be overridden via the framework configuration,
  * e.g. plugin.tx_extension.view.widget.<WidgetViewHelperClassName>.templateRootPaths
  *
  * @param ViewInterface $view
  * @return void
  */
 protected function setViewConfiguration(ViewInterface $view)
 {
     if ($this->request instanceof WidgetRequest) {
         $extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, $this->extensionName);
         $widgetViewHelperClassName = $this->request->getWidgetContext()->getWidgetViewHelperClassName();
         if (isset($extbaseFrameworkConfiguration['view']['widget'][$widgetViewHelperClassName])) {
             $configurationOverridden = $extbaseFrameworkConfiguration;
             $configurationOverridden['view'] = array_replace_recursive($configurationOverridden['view'], $configurationOverridden['view']['widget'][$widgetViewHelperClassName]);
             $this->configurationManager->setConfiguration($configurationOverridden);
             parent::setViewConfiguration($view);
             $this->configurationManager->setConfiguration($extbaseFrameworkConfiguration);
         } else {
             parent::setViewConfiguration($view);
         }
     }
 }
 /**
  * Allows the widget template root path to be overriden via the framework configuration,
  * e.g. plugin.tx_extension.view.widget.<WidgetViewHelperClassName>.templateRootPath
  *
  * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view
  * @return void
  */
 protected function setViewConfiguration(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
 {
     if (method_exists($this->request, 'getWidgetContext')) {
         $extbaseFrameworkConfiguration = $this->configurationManager->getConfiguration(\TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
         $widgetViewHelperClassName = $this->request->getWidgetContext()->getWidgetViewHelperClassName();
         if (isset($extbaseFrameworkConfiguration['view']['widget'][$widgetViewHelperClassName]['templateRootPath']) && strlen($extbaseFrameworkConfiguration['view']['widget'][$widgetViewHelperClassName]['templateRootPath']) > 0 && method_exists($view, 'setTemplateRootPath')) {
             $view->setTemplateRootPath(\TYPO3\CMS\Core\Utility\GeneralUtility::getFileAbsFileName($extbaseFrameworkConfiguration['view']['widget'][$widgetViewHelperClassName]['templateRootPath']));
         }
     } else {
         \TYPO3\CMS\Extbase\Mvc\Controller\ActionController::setViewConfiguration($view);
     }
 }
 /**
  * @param \TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view
  * @return void
  */
 protected function setViewConfiguration(\TYPO3\CMS\Extbase\Mvc\View\ViewInterface $view)
 {
     parent::setViewConfiguration($view);
     $this->setCustomPathsInView($view);
 }