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

Public Member Functions

 injectConfigurationManager (ConfigurationManagerInterface $configurationManager)
 
string getPluginNamespace (?string $extensionName, ?string $pluginName)
 
string null getPluginNameByAction (string $extensionName, string $controllerName, ?string $actionName)
 
int null getTargetPidByPlugin (string $extensionName, string $pluginName)
 
 getDefaultControllerNameByPlugin (string $extensionName, string $pluginName)
 
 getDefaultActionNameByPluginAndController (string $extensionName, string $pluginName, string $controllerName)
 
int getTargetPageTypeByFormat (?string $extensionName, string $format)
 

Protected Attributes

ConfigurationManagerInterface $configurationManager
 
array $targetPidPluginCache = array( )
 

Private Member Functions

 getPluginNameFromFrameworkConfiguration (string $extensionName, string $controllerAlias, ?string $actionName)
 

Detailed Description

Service for determining basic extension params

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

Definition at line 33 of file ExtensionService.php.

Member Function Documentation

◆ getDefaultActionNameByPluginAndController()

TYPO3\CMS\Extbase\Service\ExtensionService::getDefaultActionNameByPluginAndController ( string  $extensionName,
string  $pluginName,
string  $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

Definition at line 222 of file ExtensionService.php.

References $GLOBALS.

◆ getDefaultControllerNameByPlugin()

TYPO3\CMS\Extbase\Service\ExtensionService::getDefaultControllerNameByPlugin ( string  $extensionName,
string  $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

Definition at line 207 of file ExtensionService.php.

References $GLOBALS.

◆ getPluginNameByAction()

string null TYPO3\CMS\Extbase\Service\ExtensionService::getPluginNameByAction ( string  $extensionName,
string  $controllerName,
?string  $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 | null$actionName‪name of the target action (lowerCamelCase)
Exceptions

Definition at line 83 of file ExtensionService.php.

References $GLOBALS, and TYPO3\CMS\Extbase\Service\ExtensionService\getPluginNameFromFrameworkConfiguration().

◆ getPluginNameFromFrameworkConfiguration()

TYPO3\CMS\Extbase\Service\ExtensionService::getPluginNameFromFrameworkConfiguration ( string  $extensionName,
string  $controllerAlias,
?string  $actionName 
)
private

◆ getPluginNamespace()

string TYPO3\CMS\Extbase\Service\ExtensionService::getPluginNamespace ( ?string  $extensionName,
?string  $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 | null$extensionName‪name of the extension to retrieve the namespace for
string | null$pluginName‪name of the plugin to retrieve the namespace for
Returns
‪string plugin namespace

Definition at line 56 of file ExtensionService.php.

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

◆ getTargetPageTypeByFormat()

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

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

Parameters
string | null$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 238 of file ExtensionService.php.

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

◆ getTargetPidByPlugin()

int null TYPO3\CMS\Extbase\Service\ExtensionService::getTargetPidByPlugin ( string  $extensionName,
string  $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 156 of file ExtensionService.php.

References TYPO3\CMS\Extbase\Configuration\ConfigurationManagerInterface\CONFIGURATION_TYPE_FRAMEWORK, and TYPO3\CMS\Core\Database\Connection\PARAM_INT.

◆ injectConfigurationManager()

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

Member Data Documentation

◆ $configurationManager

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

◆ $targetPidPluginCache

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

Cache of result for getTargetPidByPlugin()

Definition at line 40 of file ExtensionService.php.