Class CMS_moduleValidation

Description

Class CMS_moduleValidation

All validations code for modules

Located in /automne/classes/modules/moduleValidation.php (line 27)

CMS_grandFather
   |
   --CMS_module
      |
      --CMS_moduleValidation
Direct descendents
Class Description
 class CMS_module_cms_aliases Class CMS_module_cms_aliases
 class CMS_module_cms_forms Class CMS_module_cms_forms
Method Summary
 void CMS_moduleValidation ( $codename)
 the getModuleValidationLabel (string, $label)
 object The getTagRepresentation (CMS_XMLTag $tag, array(mixed) $args)
 array(CMS_resourceValidation) getValidationByID (integer $itemID,  &$user, [integer $getEditionType = false], CMS_user $user)
 array(CMS_resourceValidation) getValidations (CMS_user $user)
 array(CMS_resourceValidation) getValidationsByEditions ( &$user, integer $editions, CMS_user $user)
 integer getValidationsCount (CMS_user $user)
 array(CMS_resourceValidation) getValidationsInfo (CMS_user $user)
 array(CMS_resourceValidation) getValidationsInfoByEditions ( &$user, integer $editions, [boolean $returnCount = false], CMS_user $user)
 boolean processValidation (CMS_resourceValidation $resourceValidation, integer $result)
 void _changeDataLocation (CMS_resource $resource, string $locationFrom, string $locationTo, [boolean $copyOnly = false])
Methods
Constructor CMS_moduleValidation (line 61)

Constructor.

initializes the module object

  • access: public
void CMS_moduleValidation ( $codename)
  • $codename
getModuleValidationLabel (line 519)

Get the module message constants

  • return: constant value
  • access: public
the getModuleValidationLabel (string, $label)
  • string, $label: the constant name to get
getPrimaryResourceInfo (line 543)

Get the module primary resource infos (the first record of $this->_resourceInfo table)

  • access: public
array getPrimaryResourceInfo ()
getTagRepresentation (line 75)

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_module::getTagRepresentation()
Gets a tag representation instance

Redefined in descendants as:
getValidationByID (line 365)

Gets a validation for a given item

  • return: The resourceValidations objects, false if none found for the given user.
  • access: public
array(CMS_resourceValidation) getValidationByID (integer $itemID,  &$user, [integer $getEditionType = false], CMS_user $user)
  • integer $itemID: The item we want the validations for
  • CMS_user $user: The user we want the validations for
  • integer $getEditionType: The validation type we want. by default function return RESOURCE_EDITION_LOCATION then RESOURCE_EDITION_CONTENT then RESOURCE_EDITION_SIBLINGSORDER
  • &$user
getValidations (line 97)

Gets the module validations

  • return: The resourceValidations objects, false if none found
  • access: public
array(CMS_resourceValidation) getValidations (CMS_user $user)
  • CMS_user $user: The user we want the validations for

Redefinition of:
CMS_module::getValidations()
Gets the module validations
getValidationsByEditions (line 196)

Gets the module validations for the given editions and user

  • return: The resourceValidations objects, false if noen found
  • access: public
array(CMS_resourceValidation) getValidationsByEditions ( &$user, integer $editions, CMS_user $user)
  • CMS_user $user: The user we want the validations for
  • integer $editions: The editions we want the validations of
  • &$user
getValidationsCount (line 171)

Gets the module validations count

  • access: public
integer getValidationsCount (CMS_user $user)
  • CMS_user $user: The user we want the validations for
getValidationsInfo (line 134)

Gets the module validations info

  • return: The resourceValidations objects, false if none found
  • access: public
array(CMS_resourceValidation) getValidationsInfo (CMS_user $user)
  • CMS_user $user: The user we want the validations for
getValidationsInfoByEditions (line 283)

Gets the module validations Info for the given editions and user

  • return: The resourceValidations objects, false if noen found
  • access: public
array(CMS_resourceValidation) getValidationsInfoByEditions ( &$user, integer $editions, [boolean $returnCount = false], CMS_user $user)
  • CMS_user $user: The user we want the validations for
  • integer $editions: The editions we want the validations of
  • boolean $returnCount: only return the count of validations
  • &$user
processValidation (line 474)

Process the module validations : here, calls the parent function but before :

  • return: true on success, false on failure to process
  • access: public
boolean processValidation (CMS_resourceValidation $resourceValidation, integer $result)
  • CMS_resourceValidation $resourceValidation: The resource validation to process
  • integer $result: The result of the validation process. See VALIDATION_OPTION constants

Redefinition of:
CMS_module::processValidation()
Process the module validations. Note that the EMails sent to either the transferred validator or the editors were sent before.
_changeDataLocation (line 499)

Changes The item data (in the DB) from one location to another.

  • access: private
void _changeDataLocation (CMS_resource $resource, string $locationFrom, string $locationTo, [boolean $copyOnly = false])
  • CMS_resource $resource: The resource concerned by the data location change
  • string $locationFrom: The starting location among "edited", "edition", "public", "archived", "deleted"
  • string $locationTo: The ending location among "edited", "edition", "public", "archived", "deleted"
  • boolean $copyOnly: If true, data is not deleted from the original location

Redefinition of:
CMS_module::_changeDataLocation()
Changes The page data (in the DB) from one location to another.

Inherited Methods

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

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