[ Index ]
 

Code source de Typo3 4.1.3

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/t3lib/ -> class.t3lib_scbase.php (sommaire)

Contains the parent class for 'ScriptClasses' in backend modules. $Id: class.t3lib_scbase.php 1421 2006-04-10 09:27:15Z mundaun $ Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj

Author: Kasper Skaarhoj <kasperYYYY@typo3.com>
Poids: 389 lignes (15 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

t3lib_SCbase:: (9 méthodes):
  init()
  menuConfig()
  mergeExternalItems()
  handleExternalFunctionValue()
  getExternalItemConfig()
  checkExtObj()
  checkSubExtObj()
  extObjHeader()
  extObjContent()


Classe: t3lib_SCbase  - X-Ref

Parent class for 'ScriptClasses' in backend modules.
See example comment above.

init()   X-Ref
Initializes the backend module by setting internal variables, initializing the menu.

return: void

menuConfig()   X-Ref
Initializes the internal MOD_MENU array setting and unsetting items based on various conditions. It also merges in external menu items from the global array TBE_MODULES_EXT (see mergeExternalItems())
Then MOD_SETTINGS array is cleaned up (see t3lib_BEfunc::getModuleData()) so it contains only valid values. It's also updated with any SET[] values submitted.
Also loads the modTSconfig internal variable.

return: void

mergeExternalItems($modName,$menuKey,$menuArr)   X-Ref
Merges menu items from global array $TBE_MODULES_EXT

param: string        Module name for which to find value
param: string        Menu key, eg. 'function' for the function menu.
param: array        The part of a MOD_MENU array to work on.
return: array        Modified array part.

handleExternalFunctionValue($MM_key='function', $MS_value=NULL)   X-Ref
Loads $this->extClassConf with the configuration for the CURRENT function of the menu.
If for this array the key 'path' is set then that is expected to be an absolute path to a file which should be included - so it is set in the internal array $this->include_once

param: string        The key to MOD_MENU for which to fetch configuration. 'function' is default since it is first and foremost used to get information per "extension object" (I think that is what its called)
param: string        The value-key to fetch from the config array. If NULL (default) MOD_SETTINGS[$MM_key] will be used. This is usefull if you want to force another function than the one defined in MOD_SETTINGS[function]. Call this in init() function of your Script Class: handleExternalFunctionValue('function', $forcedSubModKey)
return: void

getExternalItemConfig($modName,$menuKey,$value='')   X-Ref
Returns configuration values from the global variable $TBE_MODULES_EXT for the module given.
For example if the module is named "web_info" and the "function" key ($menuKey) of MOD_SETTINGS is "stat" ($value) then you will have the values of $TBE_MODULES_EXT['webinfo']['MOD_MENU']['function']['stat'] returned.

param: string        Module name
param: string        Menu key, eg. "function" for the function menu. See $this->MOD_MENU
param: string        Optionally the value-key to fetch from the array that would otherwise have been returned if this value was not set. Look source...
return: mixed        The value from the TBE_MODULES_EXT array.

checkExtObj()   X-Ref
Creates an instance of the class found in $this->extClassConf['name'] in $this->extObj if any (this should hold three keys, "name", "path" and "title" if a "Function menu module" tries to connect...)
This value in extClassConf might be set by an extension (in a ext_tables/ext_localconf file) which thus "connects" to a module.
The array $this->extClassConf is set in handleExternalFunctionValue() based on the value of MOD_SETTINGS[function]
(Should be) called from global scope right after inclusion of files from the ->include_once array.
If an instance is created it is initiated with $this passed as value and $this->extClassConf as second argument. Further the $this->MOD_SETTING is cleaned up again after calling the init function.

return: void

checkSubExtObj()   X-Ref
Calls the checkExtObj function in sub module if present.

return: void

extObjHeader()   X-Ref
Calls the 'header' function inside the "Function menu module" if present.
A header function might be needed to add JavaScript or other stuff in the head. This can't be done in the main function because the head is already written.
example call in the header function:
$this->pObj->doc->JScode = $this->pObj->doc->wrapScriptTags(' ...

return: void

extObjContent()   X-Ref
Calls the 'main' function inside the "Function menu module" if present

return: void



Généré le : Sun Nov 25 17:13:16 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics