Class CMS_forms_field

Description

Class CMS_forms_field

Represents a field belonging to a formular Stores some field attributes, label and validation process

Located in /automne/classes/modules/cms_forms/field.php (line 28)

CMS_grandFather
   |
   --CMS_forms_field
Class Constant Summary
Method Summary
 void __construct ([integer $id = 0], [ $formID = false])
 array analyseForm (string $postValues)
 array decodeFieldIdDatas (string $datas)
 void desactivate ()
 integer extractEncodedID (string $fieldIDDatas)
 string generateFieldIdDatas (CMS_forms_field $fieldObject)
 array getAll (integer $formID, [boolean $outputobjects = false], [boolean $withDesactivedFields = false])
 string getAttribute (string $name)
 array getFieldXHTML ([CMS_language $formLanguage = ''])
 integer getID ()
 void setAttribute (string $name, $value $value)
 boolean writeToPersistence ()
Methods
Constructor __construct (line 136)

Constructor

  • access: public
void __construct ([integer $id = 0], [ $formID = false])
  • integer $id
  • $formID
analyseForm (line 309)

Analyse a form xhtml code to create all CMS_forms_field and return it

  • return: of CMS_forms_field objects
  • access: public
array analyseForm (string $postValues)
  • string $postValues: the form xhtml code to analyse and some other values like current form id
decodeFieldIdDatas (line 514)

Analyse an xhtml identifier for a CMS_forms_field object then return decoded datas

  • return: : decoded datas
  • access: public
array decodeFieldIdDatas (string $datas)
  • string $datas: base64 encoded xhtml identifier
desactivate (line 229)

desactivate the field

  • access: public
void desactivate ()
extractEncodedID (line 464)

Analyse an array of field id datas and return the CMS_forms_field DB id associated

  • return: the field id found
  • access: private
integer extractEncodedID (string $fieldIDDatas)
  • string $fieldIDDatas: the encoded field id datas to analyse
generateFieldIdDatas (line 491)

Analyse a CMS_forms_field object then create a xhtml identifier for it

  • return: base64 encoded xhtml identifier
  • access: public
string generateFieldIdDatas (CMS_forms_field $fieldObject)
getAll (line 527)

Get all form fields

  • return: of CMS_forms_field
  • access: public
array getAll (integer $formID, [boolean $outputobjects = false], [boolean $withDesactivedFields = false])
  • integer $formID: : the form id for wanted fields
  • boolean $outputobjects: : return array of CMS_forms_field instead of array of ids (default : false)
  • boolean $withDesactivedFields: : add desactived fields to returned list (default : false)
getAttribute (line 206)

Getter for any private attribute on this class

  • access: public
string getAttribute (string $name)
  • string $name
getFieldXHTML (line 563)

Get field XHTML

  • return: array(label, input)
array getFieldXHTML ([CMS_language $formLanguage = ''])
getID (line 195)

Getter for the ID

  • access: public
integer getID ()
setAttribute (line 218)

Setter for any private attribute on this class

  • access: public
void setAttribute (string $name, $value $value)
  • string $name: name of attribute to set
  • $value $value: , the value to give
writeToPersistence (line 240)

Writes the news into persistence (MySQL for now), along with base data.

  • return: true on success, false on failure
  • access: public
boolean writeToPersistence ()

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_CMS_FORMS_FILE_PARAMS_ALLOWED_EXTENSIONS = 92 (line 30)
MESSAGE_CMS_FORMS_FILE_PARAMS_MAX_FILESIZE = 93 (line 31)

Inherited Constants

Inherited from CMS_grandFather

CMS_grandFather::ERROR_LOG
CMS_grandFather::SYSTEM_LABEL

Documentation generated on Wed, 15 Feb 2012 15:30:18 +0100 by phpDocumentor 1.4.3