‪TYPO3CMS  9.5
TYPO3\CMS\Extbase\Service\ExtensionService Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Service\ExtensionService:
TYPO3\CMS\Core\SingletonInterface

Public Member Functions

 injectObjectManager (\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
 
 injectConfigurationManager (ConfigurationManagerInterface $configurationManager)
 
string getPluginNamespace ($extensionName, $pluginName)
 
string getPluginNameByAction ($extensionName, $controllerName, $actionName)
 
bool isActionCacheable ($extensionName, $pluginName, $controllerName, $actionName)
 
int getTargetPidByPlugin ($extensionName, $pluginName)
 
string null getDefaultControllerNameByPlugin ($extensionName, $pluginName)
 
string null getDefaultActionNameByPluginAndController ($extensionName, $pluginName, $controllerName)
 
int getTargetPageTypeByFormat ($extensionName, $format)
 

Public Attributes

const PLUGIN_TYPE_PLUGIN = 'list_type'
 
const PLUGIN_TYPE_CONTENT_ELEMENT = 'CType'
 

Protected Attributes

TYPO3 CMS Extbase Object ObjectManagerInterface $objectManager
 
ConfigurationManagerInterface $configurationManager
 
array $targetPidPluginCache = array( )
 

Detailed Description

Service for determining basic extension params

only to be used within Extbase, not part of TYPO3 Core API.

Definition at line 28 of file ExtensionService.php.

Member Function Documentation

◆ getDefaultActionNameByPluginAndController()

string null TYPO3\CMS\Extbase\Service\ExtensionService::getDefaultActionNameByPluginAndController (   $extensionName,
  $pluginName,
  $controllerName 
)

This returns the name of the first action of the given plugin controller.

Parameters
string$extensionName‪name of the extension to retrieve the target PID for
string$pluginName‪name of the plugin to retrieve the target PID for
string$controllerName‪name of the controller to retrieve default action for
Returns
‪string|null

Definition at line 221 of file ExtensionService.php.

References $GLOBALS.

◆ getDefaultControllerNameByPlugin()

string null TYPO3\CMS\Extbase\Service\ExtensionService::getDefaultControllerNameByPlugin (   $extensionName,
  $pluginName 
)

This returns the name of the first controller of the given plugin.

Parameters
string$extensionName‪name of the extension to retrieve the target PID for
string$pluginName‪name of the plugin to retrieve the target PID for
Returns
‪string|null

Definition at line 207 of file ExtensionService.php.

References $GLOBALS.

◆ getPluginNameByAction()

string TYPO3\CMS\Extbase\Service\ExtensionService::getPluginNameByAction (   $extensionName,
  $controllerName,
  $actionName 
)

Iterates through the global TypoScript configuration and returns the name of the plugin that matches specified extensionName, controllerName and actionName. If no matching plugin was found, NULL is returned. If more than one plugin matches and the current plugin is not configured to handle the action, an Exception will be thrown

Parameters
string$extensionName‪name of the target extension (UpperCamelCase)
string$controllerName‪name of the target controller (UpperCamelCase)
string$actionName‪name of the target action (lowerCamelCase)
Exceptions

Definition at line 95 of file ExtensionService.php.

References $GLOBALS, and TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_FRAMEWORK.

◆ getPluginNamespace()

string TYPO3\CMS\Extbase\Service\ExtensionService::getPluginNamespace (   $extensionName,
  $pluginName 
)

Determines the plugin namespace of the specified plugin (defaults to "tx_[extensionname]_[pluginname]") If plugin.tx_$pluginSignature.view.pluginNamespace is set, this value is returned If pluginNamespace is not specified "tx_[extensionname]_[pluginname]" is returned.

Parameters
string$extensionName‪name of the extension to retrieve the namespace for
string$pluginName‪name of the plugin to retrieve the namespace for
Returns
‪string plugin namespace

Definition at line 71 of file ExtensionService.php.

References TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_FRAMEWORK.

◆ getTargetPageTypeByFormat()

int TYPO3\CMS\Extbase\Service\ExtensionService::getTargetPageTypeByFormat (   $extensionName,
  $format 
)

Resolve the page type number to use for building a link for a specific format

Parameters
string$extensionName‪name of the extension that has defined the target page type
string$format‪The format for which to look up the page type
Returns
‪int Page type number for target page

Definition at line 234 of file ExtensionService.php.

References TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_FRAMEWORK, TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_SETTINGS, and TYPO3\CMS\Core\Utility\ArrayUtility\mergeRecursiveWithOverrule().

◆ getTargetPidByPlugin()

int TYPO3\CMS\Extbase\Service\ExtensionService::getTargetPidByPlugin (   $extensionName,
  $pluginName 
)

Determines the target page of the specified plugin. If plugin.tx_$pluginSignature.view.defaultPid is set, this value is used as target page id If defaultPid is set to "auto", a the target pid is determined by loading the tt_content record that contains this plugin If the page could not be determined, NULL is returned If defaultPid is "auto" and more than one page contains the specified plugin, an Exception is thrown

Parameters
string$extensionName‪name of the extension to retrieve the target PID for
string$pluginName‪name of the plugin to retrieve the target PID for
Exceptions

Definition at line 155 of file ExtensionService.php.

References TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_FRAMEWORK.

◆ injectConfigurationManager()

TYPO3\CMS\Extbase\Service\ExtensionService::injectConfigurationManager ( ConfigurationManagerInterface  $configurationManager)
Parameters
ConfigurationManagerInterface$configurationManager

Definition at line 57 of file ExtensionService.php.

References TYPO3\CMS\Extbase\Service\ExtensionService\$configurationManager.

◆ injectObjectManager()

TYPO3\CMS\Extbase\Service\ExtensionService::injectObjectManager ( \TYPO3\CMS\Extbase\Object\ObjectManagerInterface  $objectManager)
Parameters
\TYPO3\CMS\Extbase\Object\ObjectManagerInterface$objectManager

Definition at line 49 of file ExtensionService.php.

References TYPO3\CMS\Extbase\Service\ExtensionService\$objectManager.

◆ isActionCacheable()

bool TYPO3\CMS\Extbase\Service\ExtensionService::isActionCacheable (   $extensionName,
  $pluginName,
  $controllerName,
  $actionName 
)

Checks if the given action is cacheable or not.

Parameters
string$extensionName‪Name of the target extension, without underscores
string$pluginName‪Name of the target plugin
string$controllerName‪Name of the target controller
string$actionName‪Name of the action to be called
Returns
‪bool TRUE if the specified plugin action is cacheable, otherwise FALSE

Definition at line 134 of file ExtensionService.php.

References TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_FRAMEWORK.

Member Data Documentation

◆ $configurationManager

ConfigurationManagerInterface TYPO3\CMS\Extbase\Service\ExtensionService::$configurationManager
protected

◆ $objectManager

TYPO3 CMS Extbase Object ObjectManagerInterface TYPO3\CMS\Extbase\Service\ExtensionService::$objectManager
protected

◆ $targetPidPluginCache

array TYPO3\CMS\Extbase\Service\ExtensionService::$targetPidPluginCache = array( )
protected

Cache of result for getTargetPidByPlugin()

Definition at line 44 of file ExtensionService.php.

◆ PLUGIN_TYPE_CONTENT_ELEMENT

const TYPO3\CMS\Extbase\Service\ExtensionService::PLUGIN_TYPE_CONTENT_ELEMENT = 'CType'

Definition at line 31 of file ExtensionService.php.

◆ PLUGIN_TYPE_PLUGIN

const TYPO3\CMS\Extbase\Service\ExtensionService::PLUGIN_TYPE_PLUGIN = 'list_type'

Definition at line 30 of file ExtensionService.php.