Class CMS_polymod

Description

Class CMS_modulePolymodValidation

All validations code for a polymod modules

Located in /automne/classes/modules/polymod.php (line 32)

CMS_grandFather
   |
   --CMS_module
      |
      --CMS_modulePolymodValidation
         |
         --CMS_polymod
Class Constant Summary
Method Summary
 array asArray ([array $params = array()],  &$files, array $files)
 string convertDefinitionString (string $definition, boolean $toHumanReadableFormat, [boolean $reset = false])
 void destroy ()
 boolean fromArray (array $data, array $params, CMS_language $cms_language,  &$idsRelation,  &$infos, array $idsRelation, string $infos)
 string getModuleCode (mixed $modulesCode, integer $treatmentMode, integer $visualizationMode,  &$treatedObject, array $treatmentParameters, object $treatedObject)
 array(CMS_poly_object_definition) getObjects ()
 string getObjectsInfos ( $user)
 CMS_resource getResourceByID (integer $resourceID)
 array getSearchResults (array $resultsIds,  &$user)
 object The getTagRepresentation (CMS_XMLTag $tag, array(mixed) $args)
 array getWantedTags (integer $treatmentMode, integer $visualizationMode)
 Boolean isCategoryUsed (CMS_moduleCategory $category)
 boolean isDestroyable ()
 string load (string $classname)
 string scriptInfo (array $parameters)
 Boolean scriptTask (array $parameters)
 array search (string $keyword,  &$user, [booolean $public = false], [array &$score = array()], CMS_profile_user $user)
 string treatWantedTag ( &$tag, string $tagContent, integer $treatmentMode, integer $visualizationMode,  &$treatedObject, array $treatmentParameters, string $tag, object $treatedObject)
Methods
asArray (line 1006)

Get object as an array structure used for export

  • return: : the object array structure
  • access: public
array asArray ([array $params = array()],  &$files, array $files)
  • array $params: The export parameters. array( objects => false|true : export module objects structures (default : true) )
  • array $files: The reference to the founded files used by object
  • &$files

Redefinition of:
CMS_module::asArray()
Get object as an array structure used for export
compileDefinitions (line 957)

Force compilation for all stored definitions

  • access: public
void compileDefinitions ()
convertDefinitionString (line 522)

Convert variables of a given definition string (usually a row definition)

  • return: : the module definition string converted
  • access: public
string convertDefinitionString (string $definition, boolean $toHumanReadableFormat, [boolean $reset = false])
  • string $definition: the definition string to convert
  • boolean $toHumanReadableFormat: if true, convert founded variables to a human readable format, else to a machine readable format
  • boolean $reset: if true, reset convertion table if already loaded
destroy (line 1138)

Destroy the module

  • access: public
void destroy ()

Redefinition of:
CMS_module::destroy()
Remove the module from database
fromArray (line 1057)

Import module from given array datas

  • return: : true on success, false on failure
  • access: public
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

Redefinition of:
CMS_module::fromArray()
Import module from given array datas
getModuleCode (line 294)

Return the module code for the specified treatment mode, visualization mode and object.

  • return: : the module code to add
  • access: public
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

Redefinition of:
CMS_module::getModuleCode()
Return the module code for the specified treatment mode, visualization mode and object.
getModuleReplacements (line 772)

Module replacements vars

  • return: of replacements values (pattern to replace => replacement)
  • access: public
array getModuleReplacements ()

Redefinition of:
CMS_module::getModuleReplacements()
Module replacements vars
getObjects (line 81)

Get all poly objects for current poly module

  • access: public
array(CMS_poly_object_definition) getObjects ()
getObjectsInfos (line 703)

Return a list of objects infos to be displayed in module index according to user privileges

  • return: : HTML scripts infos
  • access: public
string getObjectsInfos ( $user)
  • $user
getResourceByID (line 69)

Gets resource by its internal ID (not the resource table DB ID) This function need to stay here because sometimes it is directly queried

  • return: The CMS_resource subclassed object
  • access: public
CMS_resource getResourceByID (integer $resourceID)
  • integer $resourceID: The DB ID of the resource in the module table(s)

Redefinition of:
CMS_module::getResourceByID()
Gets resource by its internal ID (not the resource table DB ID)
getRessourceNameMethod (line 91)

Gets module ressource name method (method to get the name of resource objects of the module)

  • return: : the method name to get objects label
  • access: public
string getRessourceNameMethod ()
getRessourceTypeLabelMethod (line 101)

Gets module ressource type method (method to get the type of resource objects of the module)

  • return: : the method type to get objects type label
  • access: public
string getRessourceTypeLabelMethod ()
getSearchResults (line 827)

Get search results objects for module by Id

  • return: : results elements (cms_page)
  • access: public
array getSearchResults (array $resultsIds,  &$user)
  • array $resultsIds: : the results score ids
  • &$user
getTagRepresentation (line 493)

Gets a tag representation instance

  • return: module tag representation instance
  • access: public
object The getTagRepresentation (CMS_XMLTag $tag, array(mixed) $args)
  • CMS_XMLTag $tag: The xml tag from which to build the representation
  • array(mixed) $args: The arguments needed to build

Redefinition of:
CMS_modulePolymodValidation::getTagRepresentation()
Gets a tag representation instance
getWantedTags (line 112)

Get the tags to be treated by this module for the specified treatment mode, visualization mode and object.

  • return: of tags to be treated.
  • access: public
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).

Redefinition of:
CMS_module::getWantedTags()
Get the tags to be treated by this module for the specified treatment mode, visualization mode and object.
isCategoryUsed (line 557)

If module use CMS_moduleCategory, does it use it

  • return: true/false
  • access: public
Boolean isCategoryUsed (CMS_moduleCategory $category)

Redefinition of:
CMS_module::isCategoryUsed()
If module use CMS_moduleCategory, does it use it
isDestroyable (line 1101)

Does this module is destroyable ?

  • access: public
boolean isDestroyable ()

Redefinition of:
CMS_module::isDestroyable()
Does this module is destroyable ?
load (line 657)

Module autoload handler

  • return: : the file to use for required classname
  • access: public
string load (string $classname)
  • string $classname: the classname required for loading
scriptInfo (line 635)

Module script info : get infos for a given script parameters

  • return: : HTML scripts infos
  • access: public
string scriptInfo (array $parameters)
  • array $parameters: the task parameters task : string task to execute module : string module codename for the task uid : string module uid

Redefinition of:
CMS_module::scriptInfo()
Module script info : get infos for a given script parameters
scriptTask (line 610)

Module script task

  • return: true/false
  • access: public
Boolean scriptTask (array $parameters)
  • array $parameters: the task parameters task : string task to execute object : string module codename for the task field : string module uid ... : optional field relative parameters

Redefinition of:
CMS_module::scriptTask()
Module script task : default function, return true
search (line 803)

Search module objects by Id

  • return: : results elements Ids
  • access: public
array search (string $keyword,  &$user, [booolean $public = false], [array &$score = array()], CMS_profile_user $user)
  • string $keyword: : the search keywords
  • CMS_profile_user $user: : the user which make the search
  • booolean $public: : public search (default : false)
  • array &$score: : the results score returned by reference
  • &$user
treatWantedTag (line 155)

Treat given content tag by this module for the specified treatment mode, visualization mode and object.

  • return: the tag content treated.
  • access: public
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

Redefinition of:
CMS_module::treatWantedTag()
Treat given content tag by this module for the specified treatment mode, visualization mode and object.

Inherited Methods

Inherited From CMS_modulePolymodValidation

 CMS_modulePolymodValidation::__construct()
 CMS_modulePolymodValidation::getDefaultLanguageCodename()
 CMS_modulePolymodValidation::getPrimaryResourceDefinition()
 CMS_modulePolymodValidation::getTagRepresentation()
 CMS_modulePolymodValidation::getValidationByID()
 CMS_modulePolymodValidation::getValidations()
 CMS_modulePolymodValidation::getValidationsByEditions()
 CMS_modulePolymodValidation::getValidationsCount()
 CMS_modulePolymodValidation::getValidationsInfo()
 CMS_modulePolymodValidation::getValidationsInfoByEditions()
 CMS_modulePolymodValidation::isDeletedItem()
 CMS_modulePolymodValidation::markDeletedItem()
 CMS_modulePolymodValidation::moveResourceData()
 CMS_modulePolymodValidation::processValidation()
 CMS_modulePolymodValidation::_changeDataLocation()

Inherited From CMS_module

 CMS_module::CMS_module()
 CMS_module::asArray()
 CMS_module::createModuleFiles()
 CMS_module::destroy()
 CMS_module::fromArray()
 CMS_module::getAdminFrontendPath()
 CMS_module::getCodename()
 CMS_module::getCSSFiles()
 CMS_module::getDefaultLanguageCodename()
 CMS_module::getID()
 CMS_module::getJSFiles()
 CMS_module::getLabel()
 CMS_module::getLabelID()
 CMS_module::getModuleCategories()
 CMS_module::getModuleCode()
 CMS_module::getModuleReplacements()
 CMS_module::getParameters()
 CMS_module::getResourceByID()
 CMS_module::getTagRepresentation()
 CMS_module::getValidations()
 CMS_module::getWantedTags()
 CMS_module::hasAdmin()
 CMS_module::hasParameters()
 CMS_module::isCategoryUsed()
 CMS_module::isDestroyable()
 CMS_module::isPolymod()
 CMS_module::moduleUsage()
 CMS_module::processDailyRoutine()
 CMS_module::processValidation()
 CMS_module::scriptInfo()
 CMS_module::scriptTask()
 CMS_module::setAdminFrontend()
 CMS_module::setAndWriteParameters()
 CMS_module::setCodename()
 CMS_module::setLabel()
 CMS_module::setPolymod()
 CMS_module::treatWantedTag()
 CMS_module::useCategories()
 CMS_module::writeToPersistence()
 CMS_module::_changeDataLocation()

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
MESSAGE_ALERT_LEVEL_VALIDATION = 514 (line 56)
MESSAGE_ALERT_LEVEL_VALIDATION_DESCRIPTION = 513 (line 57)
MESSAGE_PAGE_BLOCK_FORMS = 382 (line 53)
MESSAGE_PAGE_BLOCK_FORMS_EXPLANATION = 383 (line 54)
MESSAGE_PAGE_BLOCK_GENERAL_VARS = 1706 (line 39)
MESSAGE_PAGE_BLOCK_GENERAL_VARS_EXPLANATION = 1705 (line 40)
MESSAGE_PAGE_BLOCK_TAGS = 115 (line 51)
MESSAGE_PAGE_BLOCK_TAGS_EXPLANATION = 116 (line 52)
MESSAGE_PAGE_CATEGORIES_USED = 500 (line 55)
MESSAGE_PAGE_ROW_OBJECTS_VARS_EXPLANATION = 112 (line 46)
MESSAGE_PAGE_ROW_TAGS_CHOOSE = 519 (line 59)
MESSAGE_PAGE_ROW_TAGS_EXPLANATION = 111 (line 45)

Polymod Messages

MESSAGE_PAGE_RSS_TAG_EXPLANATION = 313 (line 58)
MESSAGE_PAGE_SEARCH_TAGS = 109 (line 47)
MESSAGE_PAGE_SEARCH_TAGS_EXPLANATION = 110 (line 48)
MESSAGE_PAGE_WORKING_POLYMOD_TAGS = 113 (line 49)
MESSAGE_PAGE_WORKING_POLYMOD_TAGS_EXPLANATION = 114 (line 50)
MESSAGE_PAGE_WORKING_TAGS = 1704 (line 37)

Standard Messages

MESSAGE_PAGE_WORKING_TAGS_EXPLANATION = 1703 (line 38)

Inherited Constants

Inherited from CMS_modulePolymodValidation

CMS_modulePolymodValidation::MESSAGE_MOD_POLYMOD_VALIDATION_EDITION
CMS_modulePolymodValidation::MESSAGE_MOD_POLYMOD_VALIDATION_EDITION_OFRESOURCE
CMS_modulePolymodValidation::MESSAGE_MOD_POLYMOD_VALIDATION_LOCATIONCHANGE
CMS_modulePolymodValidation::MESSAGE_MOD_POLYMOD_VALIDATION_LOCATIONCHANGE_OFRESOURCE
CMS_modulePolymodValidation::MESSAGE_PAGE_ACTION_PREVIZ

Inherited from CMS_module

CMS_module::MESSAGE_PAGE_ADMIN_CATEGORIES
CMS_module::MESSAGE_PAGE_CATEGORIES
CMS_module::MESSAGE_PAGE_CATEGORIES_USED
CMS_module::MESSAGE_PAGE_CHOOSE
CMS_module::MESSAGE_PAGE_MANAGE_OBJECTS

Inherited from CMS_grandFather

CMS_grandFather::ERROR_LOG
CMS_grandFather::SYSTEM_LABEL

Documentation generated on Wed, 15 Feb 2012 15:36:29 +0100 by phpDocumentor 1.4.3