ExtensionService implements SingletonInterface

Service for determining basic extension params

Internal

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

Table of Contents

Interfaces

SingletonInterface
"empty" interface for singletons (marker interface pattern)

Properties

$configurationManager  : ConfigurationManagerInterface
$targetPidPluginCache  : array<string|int, mixed>
Cache of result for getTargetPidByPlugin()

Methods

getDefaultActionNameByPluginAndController()  : string|null
This returns the name of the first action of the given plugin controller.
getDefaultControllerNameByPlugin()  : string|null
This returns the name of the first controller of the given plugin.
getPluginNameByAction()  : string|null
Iterates through the global TypoScript configuration and returns the name of the plugin that matches specified extensionName, controllerName and actionName.
getPluginNamespace()  : string
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.
getTargetPageTypeByFormat()  : int
Resolve the page type number to use for building a link for a specific format
getTargetPidByPlugin()  : int|null
Determines the target page of the specified plugin.
injectConfigurationManager()  : void

Properties

$targetPidPluginCache

Cache of result for getTargetPidByPlugin()

protected array<string|int, mixed> $targetPidPluginCache = []

Methods

getDefaultActionNameByPluginAndController()

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

public getDefaultActionNameByPluginAndController(string $extensionName, string $pluginName, string $controllerName) : string|null
Parameters
$extensionName : string

name of the extension to retrieve the target PID for

$pluginName : string

name of the plugin to retrieve the target PID for

$controllerName : string

name of the controller to retrieve default action for

Return values
string|null

getDefaultControllerNameByPlugin()

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

public getDefaultControllerNameByPlugin(string $extensionName, string $pluginName) : string|null
Parameters
$extensionName : string

name of the extension to retrieve the target PID for

$pluginName : string

name of the plugin to retrieve the target PID for

Return values
string|null

getPluginNameByAction()

Iterates through the global TypoScript configuration and returns the name of the plugin that matches specified extensionName, controllerName and actionName.

public getPluginNameByAction(string $extensionName, string $controllerName, string|null $actionName) : string|null

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
$extensionName : string

name of the target extension (UpperCamelCase)

$controllerName : string

name of the target controller (UpperCamelCase)

$actionName : string|null

name of the target action (lowerCamelCase)

Tags
throws
Exception
Return values
string|null

name of the target plugin (UpperCamelCase) or NULL if no matching plugin configuration was found

getPluginNamespace()

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.

public getPluginNamespace(string|null $extensionName, string|null $pluginName) : string
Parameters
$extensionName : string|null

name of the extension to retrieve the namespace for

$pluginName : string|null

name of the plugin to retrieve the namespace for

Return values
string

plugin namespace

getTargetPageTypeByFormat()

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

public getTargetPageTypeByFormat(string|null $extensionName, string $format) : int
Parameters
$extensionName : string|null

name of the extension that has defined the target page type

$format : string

The format for which to look up the page type

Return values
int

Page type number for target page

getTargetPidByPlugin()

Determines the target page of the specified plugin.

public getTargetPidByPlugin(string $extensionName, string $pluginName) : int|null

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
$extensionName : string

name of the extension to retrieve the target PID for

$pluginName : string

name of the plugin to retrieve the target PID for

Tags
throws
Exception
Return values
int|null

uid of the target page or NULL if target page could not be determined


        
On this page

Search results