52 $pluginSignature = strtolower($extensionName .
'_' . $pluginName);
53 $defaultPluginNamespace =
'tx_' . $pluginSignature;
54 $frameworkConfiguration = $this->configurationManager->getConfiguration(\
TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, $extensionName, $pluginName);
55 if (!isset($frameworkConfiguration[
'view'][
'pluginNamespace']) || empty($frameworkConfiguration[
'view'][
'pluginNamespace'])) {
56 return $defaultPluginNamespace;
58 return $frameworkConfiguration[
'view'][
'pluginNamespace'];
75 $frameworkConfiguration = $this->configurationManager->getConfiguration(\
TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK);
77 if ($extensionName === $frameworkConfiguration[
'extensionName']) {
78 if (isset($frameworkConfiguration[
'controllerConfiguration'][$controllerName]) && in_array($actionName, $frameworkConfiguration[
'controllerConfiguration'][$controllerName][
'actions'])) {
79 return $frameworkConfiguration[
'pluginName'];
82 if (!is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'EXTCONF'][
'extbase'][
'extensions'][$extensionName][
'plugins'])) {
85 $pluginNames = array();
86 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'EXTCONF'][
'extbase'][
'extensions'][$extensionName][
'plugins'] as $pluginName => $pluginConfiguration) {
87 if (!is_array($pluginConfiguration[
'controllers'])) {
90 foreach ($pluginConfiguration[
'controllers'] as $pluginControllerName => $pluginControllerActions) {
91 if (strtolower($pluginControllerName) !== strtolower($controllerName)) {
94 if (in_array($actionName, $pluginControllerActions[
'actions'])) {
95 $pluginNames[] = $pluginName;
99 if (count($pluginNames) > 1) {
100 throw new \TYPO3\CMS\Extbase\Exception(
'There is more than one plugin that can handle this request (Extension: "' . $extensionName .
'", Controller: "' . $controllerName .
'", action: "' . $actionName .
'"). Please specify "pluginName" argument', 1280825466);
102 return count($pluginNames) > 0 ? $pluginNames[0] : NULL;
115 $frameworkConfiguration = $this->configurationManager->getConfiguration(\
TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, $extensionName, $pluginName);
116 if (isset($frameworkConfiguration[
'controllerConfiguration'][$controllerName]) && is_array($frameworkConfiguration[
'controllerConfiguration'][$controllerName]) && is_array($frameworkConfiguration[
'controllerConfiguration'][$controllerName][
'nonCacheableActions']) && in_array($actionName, $frameworkConfiguration[
'controllerConfiguration'][$controllerName][
'nonCacheableActions'])) {
135 $frameworkConfiguration = $this->configurationManager->getConfiguration(\
TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_FRAMEWORK, $extensionName, $pluginName);
136 if (!isset($frameworkConfiguration[
'view'][
'defaultPid']) || empty($frameworkConfiguration[
'view'][
'defaultPid'])) {
139 $pluginSignature = strtolower($extensionName .
'_' . $pluginName);
140 if ($frameworkConfiguration[
'view'][
'defaultPid'] ===
'auto') {
141 if (!array_key_exists($pluginSignature, $this->targetPidPluginCache)) {
142 $pages =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetRows(
'pid',
'tt_content',
'list_type=' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr($pluginSignature,
'tt_content') .
' AND CType="list"' .
$GLOBALS[
'TSFE']->sys_page->enableFields(
'tt_content') .
' AND sys_language_uid=' .
$GLOBALS[
'TSFE']->sys_language_uid,
'',
'', 2);
143 if (count($pages) > 1) {
144 throw new \TYPO3\CMS\Extbase\Exception(
'There is more than one "' . $pluginSignature .
'" plugin in the current page tree. Please remove one plugin or set the TypoScript configuration "plugin.tx_' . $pluginSignature .
'.view.defaultPid" to a fixed page id', 1280773643);
146 $this->targetPidPluginCache[$pluginSignature] = count($pages) > 0 ? $pages[0][
'pid'] : NULL;
148 return $this->targetPidPluginCache[$pluginSignature];
151 return (
int)$frameworkConfiguration[
'view'][
'defaultPid'];
162 if (!is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'EXTCONF'][
'extbase'][
'extensions'][$extensionName][
'plugins'][$pluginName][
'controllers'])) {
165 $controllers =
$GLOBALS[
'TYPO3_CONF_VARS'][
'EXTCONF'][
'extbase'][
'extensions'][$extensionName][
'plugins'][$pluginName][
'controllers'];
166 return key($controllers);
178 if (!is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'EXTCONF'][
'extbase'][
'extensions'][$extensionName][
'plugins'][$pluginName][
'controllers'][$controllerName][
'actions'])) {
181 $actions =
$GLOBALS[
'TYPO3_CONF_VARS'][
'EXTCONF'][
'extbase'][
'extensions'][$extensionName][
'plugins'][$pluginName][
'controllers'][$controllerName][
'actions'];
182 return current($actions);
194 $settings = $this->configurationManager->getConfiguration(\
TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface::CONFIGURATION_TYPE_SETTINGS, $extensionName);
195 $formatToPageTypeMapping = isset($settings[
'view'][
'formatToPageTypeMapping']) ? $settings[
'view'][
'formatToPageTypeMapping'] : array();
196 if (is_array($formatToPageTypeMapping) && array_key_exists($format, $formatToPageTypeMapping)) {
197 $targetPageType = (int)$formatToPageTypeMapping[$format];
199 return $targetPageType;
getPluginNameByAction($extensionName, $controllerName, $actionName)
getTargetPidByPlugin($extensionName, $pluginName)
getPluginNamespace($extensionName, $pluginName)
isActionCacheable($extensionName, $pluginName, $controllerName, $actionName)
const PLUGIN_TYPE_CONTENT_ELEMENT
getTargetPageTypeByFormat($extensionName, $format)
getDefaultActionNameByPluginAndController($extensionName, $pluginName, $controllerName)
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
getDefaultControllerNameByPlugin($extensionName, $pluginName)