Get array of categories this module can use to archive its datas
static array(CMS_moduleCategory)
getModuleCategories
( $attrs, array $attrs,)
-
array
$attrs,: array of attributes to determine which level of categoryies wanted, etc. format : array(language => CMS_language, level => integer, root => integer, attrs => array())
-
$attrs
Set or get the module useage for a given page id
static boolean
moduleUsage
(integer $pageID, [string $module = ''], [ $setUseage = false], [ $reset = false], boolean $setUseage,, boolean $reset:)
-
integer
$pageID: page ID to get or set useage
-
string
$module: module codename to set or get useage (default = polymod for generic polymod useage).
-
boolean
$setUseage,: if false (get mode : default), return the useage of the module for the given page ID, else (set mode), set the useage of the module for the given page ID
-
boolean
$reset:: reset all usage for given module and page ID
-
$setUseage
-
$reset
Constructor.
initializes the module if the codename is given
void
CMS_module
([ $datas = ''], string $codename)
-
string
$codename: The module codename
-
$datas
Get object as an array structure used for export
array
asArray
([array $params = array()], &$files, array $files)
-
array
$params: The export parameters. array( categories => false|true : export module categories (default : true) rows => false|true : export module rows (default : true) css => false|true : export module JS (default : true) js => false|true : export module CSS (default : true) )
-
array
$files: The reference to the founded files used by object
-
&$files
Redefined in descendants as:
Create modules files directories for current module
boolean
createModuleFiles
()
Remove the module from database
void
destroy
()
Redefined in descendants as:
Import module from given array datas
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
Redefined in descendants as:
Gets the administration frontend path.
string
getAdminFrontendPath
(integer $relativeTo)
-
integer
$relativeTo: Can be to webroot or filesystem. See constants.
Redefined in descendants as:
Gets the codename.
string
getCodename
()
Return the module CSS files
array
getCSSFiles
([ $pageId = ''], [ $allFiles = false])
Get the default language code for this module Comes from parameters or Constant Upgrades constant with parameter founded
String
getDefaultLanguageCodename
()
Redefined in descendants as:
Gets the DB ID of the instance.
integer
getID
()
Return the module JS files
array
getJSFiles
([ $pageId = ''], [ $allFiles = false])
Gets the label id.
integer
getLabelID
()
Return the module code for the specified treatment mode, visualization mode and object.
string
getModuleCode
(mixed $modulesCode, integer $treatmentMode, integer $visualizationMode, &$treatedObject, array $treatmentParameters, object $treatedObject)
-
mixed
$modulesCode: the previous modules codes (usually string)
-
integer
$treatmentMode: The current treatment mode (see constants on top of this file for accepted values).
-
integer
$visualizationMode: The current visualization mode (see constants on top of cms_page class for accepted values).
-
object
$treatedObject: The reference object to treat.
-
array
$treatmentParameters: : optionnal parameters used for the treatment. Usually an array of objects.
-
&$treatedObject
Redefined in descendants as:
Module replacements vars
array
getModuleReplacements
()
Redefined in descendants as:
Get the module parameters. Search for a file name "CODENAME_rc.xml" in PATH_MODULES_FS
array(string=>string)
getParameters
([string $onlyOne = false], [ $withType = false], [ $reset = false])
-
string
$onlyOne: The name of a single parameter wanted
-
$withType
-
$reset
Gets resource by its internal ID (not the resource table DB ID)
-
integer
$resourceID: The DB ID of the resource in the module table(s)
Redefined in descendants as:
Gets a tag representation instance
object The
getTagRepresentation
(string $tagName, array(string=>string) $tagAttributes, [ $args = false])
-
string
$tagName: The name of the tag
-
array(string=>string)
$tagAttributes: The tag attributes
-
$args
Redefined in descendants as:
Gets the module validations
array(CMS_resourceValidation)
getValidations
(CMS_user $user)
-
CMS_user
$user: The user we want the validations for
Redefined in descendants as:
Get the tags to be treated by this module for the specified treatment mode, visualization mode and object.
array
getWantedTags
(integer $treatmentMode, integer $visualizationMode)
-
integer
$treatmentMode: The current treatment mode (see constants on top of CMS_modulesTags class for accepted values).
-
integer
$visualizationMode: The current visualization mode (see constants on top of cms_page class for accepted values).
Redefined in descendants as:
Does the current module has an admin backend
boolean
hasAdmin
()
Does the module have parameters ?
boolean
hasParameters
()
If module use CMS_moduleCategory, does it use it
Redefined in descendants as:
Does this module is destroyable ?
boolean
isDestroyable
()
Redefined in descendants as:
Is given module is a poly module ?
boolean
isPolymod
(string $codename)
-
string
$codename: the codename of the module to check
Process the daily routine, which typically put out of userspace resources which have a past publication date
void
processDailyRoutine
()
Redefined in descendants as:
Process the module validations. Note that the EMails sent to either the transferred validator or the editors were sent before.
boolean
processValidation
(
CMS_resourceValidation $resourceValidation,
integer $result, [
boolean $lastValidation =
true])
-
CMS_resourceValidation
$resourceValidation: The resource validation to process
-
integer
$result: The result of the validation process. See VALIDATION_OPTION constants
-
boolean
$lastValidation: Is this the last validation done in a load of multiple validations (or the only one) ?
Redefined in descendants as:
Module script info : get infos for a given script parameters
string
scriptInfo
(array $parameters)
-
array
$parameters: the task parameters
Redefined in descendants as:
Module script task : default function, return true
Boolean
scriptTask
(array $parameters)
-
array
$parameters: the task parameters
Redefined in descendants as:
Sets the administration frontend filename. It must exists of course.
boolean
setAdminFrontend
(string $adminFrontend)
-
string
$adminFrontend: The new administration frontend filename to set
Set and write to disc the module parameters file
boolean
setAndWriteParameters
(array(string=>string) $parameters)
-
array(string=>string)
$parameters: The parameters array indexed by label
Sets the codename.
boolean
setCodename
(string $codename)
-
string
$codename: The new codename to set
Sets the label.
boolean
setLabel
( $labelMessageID, string $label)
-
string
$label: The new label to set
-
$labelMessageID
Sets the polymod status of the module
boolean
setPolymod
(boolean $isPolymod)
-
boolean
$isPolymod: The polymod status to set
Treat given content tag by this module for the specified treatment mode, visualization mode and object.
string
treatWantedTag
( &$tag, string $tagContent, integer $treatmentMode, integer $visualizationMode, &$treatedObject, array $treatmentParameters, string $tag, object $treatedObject)
-
string
$tag: The CMS_XMLTag.
-
string
$tagContent: previous tag content.
-
integer
$treatmentMode: The current treatment mode (see constants on top of CMS_modulesTags class for accepted values).
-
integer
$visualizationMode: The current visualization mode (see constants on top of cms_page class for accepted values).
-
object
$treatedObject: The reference object to treat.
-
array
$treatmentParameters: : optionnal parameters used for the treatment. Usually an array of objects.
-
&$tag
-
&$treatedObject
Redefined in descendants as:
Get module categories usage
boolean
useCategories
()
Writes the module into persistence (MySQL for now).
boolean
writeToPersistence
()
Redefined in descendants as:
Changes The page data (in the DB) from one location to another.
void
_changeDataLocation
(
CMS_page $resource,
string $locationFrom,
string $locationTo, [
boolean $copyOnly =
false])
-
CMS_page
$resource: The resource concerned by the data location change
-
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 true, data is not deleted from the original location
Redefined in descendants as:
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()