本文整理汇总了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);
}
}
}
示例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);
}
}
示例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);
}