当前位置: 首页>>代码示例>>PHP>>正文


PHP ActionController::setViewConfiguration方法代码示例

本文整理汇总了PHP中TYPO3\CMS\Extbase\Mvc\Controller\ActionController::setViewConfiguration方法的典型用法代码示例。如果您正苦于以下问题:PHP ActionController::setViewConfiguration方法的具体用法?PHP ActionController::setViewConfiguration怎么用?PHP ActionController::setViewConfiguration使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TYPO3\CMS\Extbase\Mvc\Controller\ActionController的用法示例。


在下文中一共展示了ActionController::setViewConfiguration方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: setViewConfiguration

 /**
  * 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);
         }
     }
 }
开发者ID:plan2net,项目名称:TYPO3.CMS,代码行数:23,代码来源:AbstractWidgetController.php

示例2: setViewConfiguration

 /**
  * 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);
     }
 }
开发者ID:raimundlandig,项目名称:winkel.de-DEV,代码行数:19,代码来源:MenuController.php

示例3: setViewConfiguration

 /**
  * @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);
 }
开发者ID:beyond-agentur,项目名称:pt_extbase,代码行数:9,代码来源:AbstractActionController.php


注:本文中的TYPO3\CMS\Extbase\Mvc\Controller\ActionController::setViewConfiguration方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。