Class CMS_resourceValidation

Description

Class CMS_resourceValidation

represent a resource validation. Contains a reference to the resource moduleID and the resource itself. It is passed from the kernel to the moduleIDs for workflow purposes

Located in /automne/classes/workflow/resourcevalidation.php (line 30)

CMS_grandFather
   |
   --CMS_resourceValidation
Class Constant Summary
Method Summary
 void __construct (string $moduleCodename, integer $editions,  &$resource, CMS_resource $resource)
 boolean addHelpURL (string $label, [string $url = ''], [ $target = "_blank"], [ $js = ''])
 aray(integer=>integer) getAllValidationOptions ()
 integer getEditions ()
 array(string=>string) getHelpURLs ()
 integer getID ()
 string getModuleCodename ()
 integer getResourceID ()
 string getStatusRepresentation ([boolean $tinyOutput = false], [ $user = false], [ $modCodeName = false], [ $resourceID = false])
 string getValidationLabel ()
 true hasValidationOption (integer $option)
 void removeValidationOption (integer $option)
 boolean setEditorsStack (CMS_stack $stack)
 void setID (integer $id)
 boolean setValidationLabel (string $label)
 boolean setValidationShortLabel (string $label)
 boolean setValidationTypeLabel (string $label)
 integer writeToPersistence ()
Methods
Constructor __construct (line 143)

Constructor. Caution ! Only the mandatory properties are passed here, but many others are needed to provide a readable validation.

  • access: public
void __construct (string $moduleCodename, integer $editions,  &$resource, CMS_resource $resource)
  • string $moduleCodename: the codename of the module the resource belongs to
  • integer $editions: the editions concerned by the validation
  • CMS_resource $resource: the resource to be validated
  • &$resource
addHelpURL (line 318)

Data access method : add an URL to the help URLs array

  • return: true on success to set it, false otherwise.
  • access: public
boolean addHelpURL (string $label, [string $url = ''], [ $target = "_blank"], [ $js = ''])
  • string $label: the URL label
  • string $url: the target for this URL, _blank if not given
  • $target
  • $js
cleanOldValidations (line 434)

cleans the table of the validations older than self::VALIDATION_PERSISTENCE_TIMEOUT.

  • access: public
void cleanOldValidations ()
getAllValidationOptions (line 489)

Get the array of VALIDATION_OPTIONs

  • return: The validation options constants indexed by message ID
  • access: public
aray(integer=>integer) getAllValidationOptions ()
getEditions (line 333)

Data access method : get the editions concerned by the validation

  • return: the sum of REOURCE_EDITION constants
  • access: public
integer getEditions ()
getEditorsStack (line 406)

Data access method : get the editors stack

  • return: the users ids stack.
  • access: public
CMS_stack getEditorsStack ()
getHelpURLs (line 304)

Data access method : get the help URLs

  • return: the help URLs
  • access: public
array(string=>string) getHelpURLs ()
getID (line 193)

Data access method : get the validation id

  • return: the validation id (from DB for old system or from validation Infos for the new one)
  • access: public
integer getID ()
getModuleCodename (line 245)

Data access method : get the moduleCodename

  • return: the module codename
  • access: public
string getModuleCodename ()
getResource (line 379)

Data access method : get the resource object

  • return: The resource object, i.e. the subclassed resource object. Return false on failure to retrieve it.
  • access: public
CMS_resource getResource ()
getResourceID (line 368)

Data access method : get the id of the resource

  • return: the internal id of the resource (module-wide range)
  • access: public
integer getResourceID ()
getStatusRepresentation (line 395)

Data access method : get the status representation HTML string

  • return: the status HTML representation
  • access: public
string getStatusRepresentation ([boolean $tinyOutput = false], [ $user = false], [ $modCodeName = false], [ $resourceID = false])
  • boolean $tinyOutput: If set to true, returns a compact version of the representation.
  • $user
  • $modCodeName
  • $resourceID
getValidationLabel (line 256)

Data access method : get the label

  • return: the label
  • access: public
string getValidationLabel ()
getValidationShortLabel (line 267)

Data access method : get the short label if exist

  • return: the short label
  • access: public
string getValidationShortLabel ()
getValidationTypeLabel (line 344)

Data access method : get the validation type label

  • return: the internal type of validation label (module-wide range)
  • access: public
integer getValidationTypeLabel ()
hasValidationOption (line 178)

Tests for the presence of a validation option

  • return: if it's part of the current options, false otherwise
  • access: public
true hasValidationOption (integer $option)
  • integer $option: the value of an option to test for
removeValidationOption (line 164)

Removes a validation option from the possibilities.

  • access: public
void removeValidationOption (integer $option)
  • integer $option: the value of an option
setEditorsStack (line 418)

Data access method : set the editors stack.

  • return: true on success to set it, false otherwise.
  • access: public
boolean setEditorsStack (CMS_stack $stack)
setID (line 210)

Data access method : set the DB id

  • access: public
void setID (integer $id)
  • integer $id: The ID to set
setValidationLabel (line 279)

Data access method : set the validation label

  • return: true on success to set it, false otherwise.
  • access: public
boolean setValidationLabel (string $label)
  • string $label: the label of the validation
setValidationShortLabel (line 292)

Data access method : set the validation short label

  • return: true on success to set it, false otherwise.
  • access: public
boolean setValidationShortLabel (string $label)
  • string $label: the short label of the validation
setValidationTypeLabel (line 356)

Data access method : set the validation type label

  • return: true on success to set it, false otherwise.
  • access: public
boolean setValidationTypeLabel (string $label)
  • string $label: the label of the internal type
writeToPersistence (line 456)

Writes the object instance into persistance.

  • return: the DB id of the inserted validation.
  • access: public
integer writeToPersistence ()
_constructValidationID (line 223)

Construct the validation ID Validation must have module codename, editions and resourceID set The module mus have getValidationByID function to properly decode the created ID

  • return: true on success, false on failure
  • access: private
boolean _constructValidationID ()

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
MESSAGE_VALIDATION_ACCEPT = 38 (line 32)
MESSAGE_VALIDATION_REFUSE = 39 (line 33)
MESSAGE_VALIDATION_TRANSFER = 40 (line 34)
VALIDATION_PERSISTENCE_TIMEOUT = 100 (line 40)

Validation persistence timeout, in minutes. All validations stored in persistence older than this amount will be deleted.

Default : 100 minutes

Inherited Constants

Inherited from CMS_grandFather

CMS_grandFather::ERROR_LOG
CMS_grandFather::SYSTEM_LABEL

Documentation generated on Wed, 15 Feb 2012 15:38:28 +0100 by phpDocumentor 1.4.3