[ 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_loadmodules.php (sommaire)

This document provides a class that loads the modules for the TYPO3 interface. $Id: class.t3lib_loadmodules.php 1770 2006-10-25 10:27:07Z typo3 $ Modifications by Rene Fritz, 2001 Revised for TYPO3 3.6 July/2003 by Kasper Skaarhoj

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

Définit 1 class

t3lib_loadModules:: (8 méthodes):
  load()
  checkExtensionModule()
  checkMod()
  checkModAccess()
  checkModWorkspace()
  parseModulesArray()
  cleanName()
  getRelativePath()


Classe: t3lib_loadModules  - X-Ref

Load Backend Interface modules

Typically instantiated like this:
$this->loadModules = t3lib_div::makeInstance('t3lib_loadModules');
$this->loadModules->load($TBE_MODULES);

load($modulesArray,$BE_USER='')   X-Ref
Init.
The outcome of the load() function will be a $this->modules array populated with the backend module structure available to the BE_USER
Further the global var $LANG will have labels and images for the modules loaded in an internal array.

param: array        $modulesArray should be the global var $TBE_MODULES, $BE_USER can optionally be set to an alternative Backend user object than the global var $BE_USER (which is the currently logged in user)
param: object        Optional backend user object to use. If not set, the global BE_USER object is used.
return: void

checkExtensionModule($name)   X-Ref
If the module name ($name) is a module from an extension (has path in $this->absPathArray) then that path is returned relative to PATH_site

param: string        Module name
return: string        If found, the relative path from PATH_site

checkMod($name, $fullpath)   X-Ref
Here we check for the module.
Return values:
'notFound':    If the module was not found in the path (no "conf.php" file)
false:        If no access to the module (access check failed)
array():    Configuration array, in case a valid module where access IS granted exists.

param: string        Module name
param: string        Absolute path to module
return: mixed        See description of function

checkModAccess($name,$MCONF)   X-Ref
Returns true if the internal BE_USER has access to the module $name with $MCONF (based on security level set for that module)

param: string        Module name
param: array        MCONF array (module configuration array) from the modules conf.php file (contains settings about what access level the module has)
return: boolean        True if access is granted for $this->BE_USER

checkModWorkspace($name,$MCONF)   X-Ref
Check if a module is allowed inside the current workspace for be user
Processing happens only if $this->observeWorkspaces is TRUE

param: string        Module name
param: array        MCONF array (module configuration array) from the modules conf.php file (contains settings about workspace restrictions)
return: boolean        True if access is granted for $this->BE_USER

parseModulesArray($arr)   X-Ref
Parses the moduleArray ($TBE_MODULES) into a internally useful structure.
Returns an array where the keys are names of the module and the values may be true (only module) or an array (of submodules)

param: array        moduleArray ($TBE_MODULES)
return: array        Output structure with available modules

cleanName($str)   X-Ref
The $str is cleaned so that it contains alphanumerical characters only. Modules must only consist of these characters

param: string        String to clean up
return: string

getRelativePath($baseDir,$destDir)   X-Ref
Get relative path for $destDir compared to $baseDir

param: string        Base directory
param: string        Destination directory
return: string        The relative path of destination compared to base.



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