‪TYPO3CMS  9.5
TYPO3\CMS\Backend\Module\AbstractFunctionModule Class Reference

Public Member Functions

 __construct ()
 
 init ($pObj)
 
 handleExternalFunctionValue ()
 
 checkExtObj ()
 
 extObjContent ()
 
array modMenu ()
 

Public Attributes

BaseScriptClass $pObj
 
BaseScriptClass $extObj
 
string $localLangFile = ''
 
array $extClassConf
 
string $function_key = ''
 

Protected Member Functions

LanguageService getLanguageService ()
 
BackendUserAuthentication getBackendUserAuthentication ()
 
DocumentTemplate getDocumentTemplate ()
 
PageRenderer getPageRenderer ()
 

Protected Attributes

PageRenderer $pageRenderer
 

Detailed Description

Parent class for 'Extension Objects' in backend modules.

Used for 'submodules' to other modules. Also called 'Function menu modules' in \TYPO3\CMS\Core\Utility\ExtensionManagementUtility. And now its even called 'Extension Objects'. Or 'Module functions'. Wish we had just one name. Or a name at all...(?) Thank God its not so advanced when it works...

In other words this class is used for backend modules which is not true backend modules appearing in the menu but rather adds themselves as a new entry in the function menu which typically exists for a backend module (like Web>Info or Tools etc...) The magic that binds this together is stored in the global variable $TBE_MODULES_EXT where extensions wanting to connect a module based on this class to an existing backend module store configuration which consists of the classname, script-path and a label (title/name).

For more information about this, please see the large example comment for the class \TYPO3\CMS\Backend\Module\BaseScriptClass. This will show the principle of a 'level-1' connection. The more advanced example - having two layers as it is done with the 'web_info' module - can be seen in the comment above.

EXAMPLE: One level. This can be seen in the extension 'frontend' where the info module have a function added. In 'ext_tables.php' this is done by this function call:

\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::insertModuleFunction( 'web_info', \TYPO3\CMS\Frontend\Controller\PageInformationController::class, NULL, 'LLL:EXT:frontend/Resources/Private/Language/locallang_tca.xlf:mod_tx_cms_webinfo_page' );

For this two-level thing to work it also requires that the parent module (the real backend module) supports it. This is the case for the modules web_info since it has two times inclusion sections in their index.php scripts.

See also
‪\TYPO3\CMS\Backend\Module\BaseScriptClass
Deprecated:
‪since TYPO3 v9, will be removed in TYPO3 v10.0

Definition at line 65 of file AbstractFunctionModule.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Module\AbstractFunctionModule::__construct ( )

Constructor deprecates the class

Definition at line 110 of file AbstractFunctionModule.php.

Member Function Documentation

◆ checkExtObj()

TYPO3\CMS\Backend\Module\AbstractFunctionModule::checkExtObj ( )

Same as \TYPO3\CMS\Backend\Module\BaseScriptClass::checkExtObj()

See also
‪\TYPO3\CMS\Backend\Module\BaseScriptClass::checkExtObj()

Definition at line 156 of file AbstractFunctionModule.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getModuleData().

◆ extObjContent()

TYPO3\CMS\Backend\Module\AbstractFunctionModule::extObjContent ( )

Calls the main function inside ANOTHER sub-submodule which might exist.

Definition at line 169 of file AbstractFunctionModule.php.

◆ getBackendUserAuthentication()

BackendUserAuthentication TYPO3\CMS\Backend\Module\AbstractFunctionModule::getBackendUserAuthentication ( )
protected
Returns
‪BackendUserAuthentication

Definition at line 198 of file AbstractFunctionModule.php.

References $GLOBALS.

◆ getDocumentTemplate()

DocumentTemplate TYPO3\CMS\Backend\Module\AbstractFunctionModule::getDocumentTemplate ( )
protected
Returns
‪DocumentTemplate

Definition at line 206 of file AbstractFunctionModule.php.

References $GLOBALS.

◆ getLanguageService()

LanguageService TYPO3\CMS\Backend\Module\AbstractFunctionModule::getLanguageService ( )
protected
Returns
‪LanguageService

Definition at line 190 of file AbstractFunctionModule.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Module\AbstractFunctionModule\init().

◆ getPageRenderer()

PageRenderer TYPO3\CMS\Backend\Module\AbstractFunctionModule::getPageRenderer ( )
protected
Returns
‪PageRenderer

Definition at line 214 of file AbstractFunctionModule.php.

References TYPO3\CMS\Backend\Module\AbstractFunctionModule\$pageRenderer.

◆ handleExternalFunctionValue()

TYPO3\CMS\Backend\Module\AbstractFunctionModule::handleExternalFunctionValue ( )

If $this->function_key is set (which means there are two levels of object connectivity) then $this->extClassConf is loaded with the TBE_MODULES_EXT configuration for that sub-sub-module

See also
$function_key, \TYPO3\CMS\FuncWizards\Controller\WebFunctionWizardsBaseController::init()

Definition at line 142 of file AbstractFunctionModule.php.

References TYPO3\CMS\Backend\Utility\BackendUtility\getModuleData().

◆ init()

TYPO3\CMS\Backend\Module\AbstractFunctionModule::init (   $pObj)

Initialize the object

Parameters
\object$pObj‪A reference to the parent (calling) object
Exceptions

Definition at line 125 of file AbstractFunctionModule.php.

References TYPO3\CMS\Backend\Module\AbstractFunctionModule\$pObj, TYPO3\CMS\Backend\Module\AbstractFunctionModule\getLanguageService(), and TYPO3\CMS\Core\Localization\LanguageService\includeLLFile().

◆ modMenu()

array TYPO3\CMS\Backend\Module\AbstractFunctionModule::modMenu ( )

Dummy function - but is used to set up additional menu items for this submodule.

Returns
‪array A MOD_MENU array which will be merged together with the one from the parent object
See also
init(), \TYPO3\CMS\Frontend\Controller\PageInformationController::modMenu()

Definition at line 182 of file AbstractFunctionModule.php.

Member Data Documentation

◆ $extClassConf

array TYPO3\CMS\Backend\Module\AbstractFunctionModule::$extClassConf

Contains module configuration parts from TBE_MODULES_EXT if found

See also
handleExternalFunctionValue()

Definition at line 92 of file AbstractFunctionModule.php.

◆ $extObj

BaseScriptClass TYPO3\CMS\Backend\Module\AbstractFunctionModule::$extObj

Definition at line 77 of file AbstractFunctionModule.php.

◆ $function_key

string TYPO3\CMS\Backend\Module\AbstractFunctionModule::$function_key = ''

If this value is set it points to a key in the TBE_MODULES_EXT array (not on the top level..) where another classname/filepath/title can be defined for sub-subfunctions. This is a little hard to explain, so see it in action; it used in the extension 'func_wizards' in order to provide yet a layer of interfacing with the backend module. The extension 'func_wizards' has this description: 'Adds the 'Wizards' item to the function menu in Web>Func. This is just a framework for wizard extensions.' - so as you can see it is designed to allow further connectivity - 'level 2'

See also
handleExternalFunctionValue(), \TYPO3\CMS\FuncWizards\Controller\WebFunctionWizardsBaseController

Definition at line 101 of file AbstractFunctionModule.php.

◆ $localLangFile

string TYPO3\CMS\Backend\Module\AbstractFunctionModule::$localLangFile = ''

Can be hardcoded to the name of a locallang.xlf file (from the same directory as the class file) to use/load and is included / added to $GLOBALS['LOCAL_LANG']

See also
init()

Definition at line 85 of file AbstractFunctionModule.php.

◆ $pageRenderer

PageRenderer TYPO3\CMS\Backend\Module\AbstractFunctionModule::$pageRenderer
protected

◆ $pObj

BaseScriptClass TYPO3\CMS\Backend\Module\AbstractFunctionModule::$pObj

Contains a reference to the parent (calling) object (which is probably an instance of an extension class to \TYPO3\CMS\Backend\Module\BaseScriptClass

See also
init()

Definition at line 73 of file AbstractFunctionModule.php.

Referenced by TYPO3\CMS\Backend\Module\AbstractFunctionModule\init().