TYPO3 CMS  TYPO3_6-2
TYPO3\CMS\Extbase\Service\ExtensionService Class Reference
Inheritance diagram for TYPO3\CMS\Extbase\Service\ExtensionService:
TYPO3\CMS\Core\SingletonInterface Tx_Extbase_Service_ExtensionService

Public Member Functions

 getPluginNamespace ($extensionName, $pluginName)
 
 getPluginNameByAction ($extensionName, $controllerName, $actionName)
 
 isActionCacheable ($extensionName, $pluginName, $controllerName, $actionName)
 
 getTargetPidByPlugin ($extensionName, $pluginName)
 
 getDefaultControllerNameByPlugin ($extensionName, $pluginName)
 
 getDefaultActionNameByPluginAndController ($extensionName, $pluginName, $controllerName)
 
 getTargetPageTypeByFormat ($extensionName, $format)
 

Public Attributes

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

Protected Attributes

 $objectManager
 
 $configurationManager
 
 $targetPidPluginCache = array()
 

Detailed Description

This file is part of the TYPO3 CMS project.

It is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, either version 2 of the License, or any later version.

For the full copyright and license information, please read the LICENSE.txt file that was distributed with this source code.

The TYPO3 project - inspiring people to share! Service for determining basic extension params

Definition at line 19 of file ExtensionService.php.

Member Function Documentation

◆ getDefaultActionNameByPluginAndController()

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

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

Parameters
string$extensionNamename of the extension to retrieve the target PID for
string$pluginNamename of the plugin to retrieve the target PID for
string$controllerNamename of the controller to retrieve default action for
Returns
string|NULL

Definition at line 177 of file ExtensionService.php.

References $GLOBALS.

◆ getDefaultControllerNameByPlugin()

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

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

Parameters
string$extensionNamename of the extension to retrieve the target PID for
string$pluginNamename of the plugin to retrieve the target PID for
Returns
string|NULL

Definition at line 161 of file ExtensionService.php.

References $GLOBALS.

◆ getPluginNameByAction()

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$extensionNamename of the target extension (UpperCamelCase)
string$controllerNamename of the target controller (UpperCamelCase)
string$actionNamename of the target action (lowerCamelCase)
Exceptions

Definition at line 74 of file ExtensionService.php.

References $GLOBALS.

◆ getPluginNamespace()

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$extensionNamename of the extension to retrieve the namespace for
string$pluginNamename of the plugin to retrieve the namespace for
Returns
string plugin namespace

Definition at line 51 of file ExtensionService.php.

◆ getTargetPageTypeByFormat()

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$extensionNamename of the extension that has defined the target page type
string$formatThe format for which to look up the page type
Returns
integer Page type number for target page

Definition at line 192 of file ExtensionService.php.

◆ getTargetPidByPlugin()

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$extensionNamename of the extension to retrieve the target PID for
string$pluginNamename of the plugin to retrieve the target PID for
Exceptions

Definition at line 134 of file ExtensionService.php.

References $GLOBALS.

◆ isActionCacheable()

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

Checks if the given action is cacheable or not.

Parameters
string$extensionNameName of the target extension, without underscores
string$pluginNameName of the target plugin
string$controllerNameName of the target controller
string$actionNameName of the action to be called
Returns
boolean TRUE if the specified plugin action is cacheable, otherwise FALSE

Definition at line 114 of file ExtensionService.php.

Member Data Documentation

◆ $configurationManager

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

Definition at line 34 of file ExtensionService.php.

◆ $objectManager

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

Definition at line 28 of file ExtensionService.php.

◆ $targetPidPluginCache

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

Definition at line 40 of file ExtensionService.php.

◆ PLUGIN_TYPE_CONTENT_ELEMENT

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

Definition at line 22 of file ExtensionService.php.

◆ PLUGIN_TYPE_PLUGIN

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

Definition at line 21 of file ExtensionService.php.