Class CMS_modulePolymodValidation

Description

Class CMS_modulePolymodValidation

All validations code for a polymod modules

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

CMS_grandFather
   |
   --CMS_module
      |
      --CMS_modulePolymodValidation
Direct descendents
Class Description
 class CMS_polymod Class CMS_modulePolymodValidation
Class Constant Summary
Method Summary
 static boolean moveResourceData ( $module, integer $resourceID, string $locationFrom, string $locationTo, [boolean $copyOnly = false], string $module,)
 void __construct ([ $codename = ''])
 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 isDeletedItem (integer $itemID)
 boolean markDeletedItem (integer $itemID)
 boolean processValidation (CMS_resourceValidation $resourceValidation, integer $result, [ $lastValidation = true])
 void _changeDataLocation (CMS_resource $resource, string $locationFrom, string $locationTo, [boolean $copyOnly = false])
Methods
static moveResourceData (line 750)

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, integer $resourceID, string $locationFrom, string $locationTo, [boolean $copyOnly = false], string $module,)
  • string $module,: The module codename
  • 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
Constructor __construct (line 56)

Constructor.

initializes the module object

  • access: public
void __construct ([ $codename = ''])
  • $codename
getDefaultLanguageCodename (line 873)

Get the default language code for this module Comes from parameters or Constant Upgrades constant with parameter founded

  • return: the language codename
  • access: public
String getDefaultLanguageCodename ()

Redefinition of:
CMS_module::getDefaultLanguageCodename()
Get the default language code for this module Comes from parameters or Constant Upgrades constant with parameter founded
getPrimaryResourceDefinition (line 888)

Get the module primary resource definition

  • return: true
  • access: public
boolean getPrimaryResourceDefinition ()
getTagRepresentation (line 70)

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 413)

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 92)

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 193)

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 168)

Gets the module validations count

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

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 306)

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
isDeletedItem (line 688)

Check if item is deleted

  • return: true if ite is deleted, false otherwise
boolean isDeletedItem (integer $itemID)
  • integer $itemID: The item ID to check as deleted
markDeletedItem (line 668)

Mark item as deleted (to be easily excluded from all searches)

boolean markDeletedItem (integer $itemID)
  • integer $itemID: The item ID to mark as deleted
processValidation (line 549)

Process the module validations. Note that the EMails sent to either the transferred validator or the editors were sent before.

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

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 717)

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
MESSAGE_MOD_POLYMOD_VALIDATION_EDITION = 2 (line 29)
MESSAGE_MOD_POLYMOD_VALIDATION_EDITION_OFRESOURCE = 3 (line 30)
MESSAGE_MOD_POLYMOD_VALIDATION_LOCATIONCHANGE = 4 (line 31)
MESSAGE_MOD_POLYMOD_VALIDATION_LOCATIONCHANGE_OFRESOURCE = 5 (line 32)
MESSAGE_PAGE_ACTION_PREVIZ = 811 (line 33)

Inherited Constants

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:32:33 +0100 by phpDocumentor 1.4.3