Class CMS_modulesCatalog

Description

Class CMS_modulesCatalog

Represents a collection of modules

Located in /automne/classes/modules/modulescatalog.php (line 29)

CMS_grandFather
   |
   --CMS_modulesCatalog
Method Summary
 static boolean fromArray (array $data, array $params, CMS_language $cms_language,  &$idsRelation,  &$infos, array $idsRelation, string $infos)
 static array(CMS_module) getAll ([ $orderBy = "label"], [ $polymodOnly = false], [ $reset = false])
 static array(codename getAllCodenames ([ $reset = false])
 static array(array(string=>CMS_resourceValidation)) getAllValidations (CMS_profile_user &$user, [ $light = false])
 static CMS_module getByCodename ( $datas, string $codename)
 static integer getValidationsCount (CMS_profile_user &$user)
 static boolean isPolymod (string $codename)
 static boolean moveResourceData ( &$module, string $tablesPrefix, string $resourceIDFieldName, integer $resourceID, string $locationFrom, string $locationTo, [boolean $copyOnly = false], CMS_module $module)
Methods
static fromArray (line 417)

Import module from given array datas

  • return: : true on success, false on failure
  • access: public
static boolean fromArray (array $data, array $params, CMS_language $cms_language,  &$idsRelation,  &$infos, array $idsRelation, string $infos)
  • array $data: The module datas to import
  • array $params: The import parameters. array( create => false|true : create missing objects (default : true) update => false|true : update existing objects (default : true) files => false|true : use files from PATH_TMP_FS (default : true) )
  • CMS_language $cms_language: The CMS_langage to use
  • array $idsRelation: : Reference : The relations between import datas ids and real imported ids
  • string $infos: : Reference : The import infos returned
  • &$idsRelation
  • &$infos
static getAll (line 106)

Get All the available modules

  • return: All the available modules sorted by label
  • access: public
static array(CMS_module) getAll ([ $orderBy = "label"], [ $polymodOnly = false], [ $reset = false])
  • $orderBy
  • $polymodOnly
  • $reset
static getAllCodenames (line 174)

Get all modules codenames

  • return: => codename)
  • access: public
static array(codename getAllCodenames ([ $reset = false])
  • $reset
static getAllValidations (line 220)

Get All the validations available for the given user

  • return: All the available validations in an array where each elements are the validations array indexed by the module codename
  • access: public
static array(array(string=>CMS_resourceValidation)) getAllValidations (CMS_profile_user &$user, [ $light = false])
static getByCodename (line 38)

Get a module by its codename.

  • return: The module wanted
  • access: public
static CMS_module getByCodename ( $datas, string $codename)
  • string $codename: the codename of the module to get
  • $datas
static getValidationsCount (line 250)

Get count of validations available for the given user

  • access: public
static integer getValidationsCount (CMS_profile_user &$user)
static isPolymod (line 200)

Is given module is a poly module ?

  • return: true if yes, false otherwise
  • access: public
static boolean isPolymod (string $codename)
  • string $codename: the codename of the module to check
static moveResourceData (line 284)

Move the data of a resource from one data location to another.

May be used by every module, provided it respects the naming rules described in the modules HOWTO

  • return: true on success, false on failure
  • access: public
static boolean moveResourceData ( &$module, string $tablesPrefix, string $resourceIDFieldName, integer $resourceID, string $locationFrom, string $locationTo, [boolean $copyOnly = false], CMS_module $module)
  • CMS_module $module: The module who want its data moved
  • string $tablesPrefix: The prefix of the tables containing the data
  • string $resourceIDFieldName: The name of the field containing the resource ID
  • integer $resourceID: The DB ID of the resource whose data we want to move
  • string $locationFrom: The starting location, among the available RESOURCE_DATA_LOCATION
  • string $locationTo: The ending location, among the available RESOURCE_DATA_LOCATION
  • boolean $copyOnly: If set to true, the deletion from the originating tables and dirs won't occur
  • &$module

Inherited Methods

Inherited From CMS_grandFather

 CMS_grandFather::autoload()
 CMS_grandFather::hasError()
 CMS_grandFather::log()
 CMS_grandFather::PHPErrorHandler()
 CMS_grandFather::raiseError()
 CMS_grandFather::setDebug()
 CMS_grandFather::setLog()
 CMS_grandFather::_raiseError()
 CMS_grandFather::__call()
Class Constants

Documentation generated on Wed, 15 Feb 2012 15:32:44 +0100 by phpDocumentor 1.4.3