Class CMS_object_common

Description

Class CMS_object_common

represent common methods for CMS_object_{type}

Located in /automne/classes/modules/polymod/objects/object_common.php (line 27)

CMS_grandFather
   |
   --CMS_object_common
Direct descendents
Class Description
 class CMS_object_file Class CMS_object_file
 class CMS_object_usergroup Class CMS_object_usergroup
 class CMS_object_image Class CMS_object_image
 class CMS_object_text Class CMS_object_text
 class CMS_object_google_coordinates Class CMS_object_coordinates
 class CMS_object_href Class CMS_object_href
 class CMS_object_integer Class CMS_object_integer
 class CMS_object_categories Class CMS_object_categories
 class CMS_object_oembed Class CMS_object_string
 class CMS_object_language Class CMS_object_language
 class CMS_object_email Class CMS_object_email
 class CMS_object_boolean Class CMS_object_integer
 class CMS_object_string Class CMS_object_string
 class CMS_object_date Class CMS_object_date
 class CMS_multi_poly_object Class CMS_multi_poly_object
Class Constant Summary
Method Summary
 static string serializeHTMLParameters ( $inputParams, array $values)
 void __construct ([array $datas = array()], CMS_object_field &$field, [boolean $public = false])
 array asArray ()
 boolean checkMandatory (array $values, string $prefixName, [boolean $newFormat = false])
 string, getDescription (mixed $language)
 string, getFieldDescription (mixed $language)
 string, getFieldLabel (mixed $language)
 string getFieldOrderSQL (integer $fieldID, mixed $direction, string $operator, string $where, [boolean $public = false])
 string getFieldSearchSQL (integer $fieldID, mixed $value, string $operator, string $where, [boolean $public = false])
 string getHTMLAdmin ( $fieldID,  $language, string $prefixName, integer $fieldID,, CMS_language $language,)
 string getHTMLDescription ()
 string getHTMLSubFieldsParameters ( $language,  $prefixName)
 string getInput ( $fieldID, multidimentionnal $language,  $inputParams, array $values)
 string getLabel ()
 array getLabelsStructure ( &$language, [ $objectName = ''])
 string, getObjectLabel (mixed $language)
 array(string getParamsValues ()
 mixed getParamValue (string $paramName)
 string getSoapValues ( $fieldID,  $language)
 multidimentionnal getStructure ()
 array(integer getSubFieldParameters ()
 array(integer getSubFieldsDefinition (integer $objectID)
 multidimentionnal getValue (string $name, [string $parameters = ''])
 boolean hasParameters ()
 boolean setParamValue ( $name, string $value, string $paramName)
 boolean setSoapValues (integer $fieldID, $domdocument $domdocument, [$itemId $itemId = ''])
 boolean setSubFieldsDefinition ($subFieldsDefinition $subFieldsDefinition)
 boolean setValues (array $values, string $prefixName, [boolean $newFormat = false])
 array, treatParams (array $post, string $prefix)
 boolean writeToPersistence ()
Methods
static serializeHTMLParameters (line 163)

Return only html parameters serialized as string

  • return: : the serialized parameters
  • access: public
static string serializeHTMLParameters ( $inputParams, array $values)
  • array $values: : parameters
  • $inputParams
Constructor __construct (line 120)

Constructor.

initialize object.

  • access: public
void __construct ([array $datas = array()], CMS_object_field &$field, [boolean $public = false])
  • array $datas: DB object values : array(integer "subFieldID" => mixed)
  • boolean $public: values are public or edited ? (default is edited)
  • CMS_object_field &$field: reference

Redefined in descendants as:
asArray (line 965)

Get field parameters as an array structure used for export

  • return: : the object array structure
  • access: public
array asArray ()

Redefined in descendants as:
checkMandatory (line 323)

check object Mandatories Values

  • return: true on success, false on failure
  • access: public
boolean checkMandatory (array $values, string $prefixName, [boolean $newFormat = false])
  • array $values: : the POST result values
  • string $prefixName: prefixname : the prefix used for post names
  • boolean $newFormat: newFormat : new automne v4 format (default false for compatibility)

Redefined in descendants as:
getDescription (line 423)

get admin object description

  • return: the description
  • access: public
string, getDescription (mixed $language)
  • mixed $language: the language code (string) or the CMS_language (object) to use for description

Redefined in descendants as:
getFieldDescription (line 403)

get admin field description if any

  • return: the label or false if none defined
  • access: public
string, getFieldDescription (mixed $language)
  • mixed $language: the language code (string) or the CMS_language (object) to use for label
getFieldLabel (line 386)

get admin field label

  • return: the label
  • access: public
string, getFieldLabel (mixed $language)
  • mixed $language: the language code (string) or the CMS_language (object) to use for label
getFieldOrderSQL (line 919)

Get field order SQL request (used by class CMS_object_search)

  • return: : the SQL request
  • access: public
string getFieldOrderSQL (integer $fieldID, mixed $direction, string $operator, string $where, [boolean $public = false])
  • integer $fieldID: : this field id in object (aka $this->_field->getID())
  • mixed $direction: : the direction to search (asc/desc)
  • string $operator: : additionnal search operator
  • string $where: : where clauses to add to SQL
  • boolean $public: : values are public or edited ? (default is edited)

Redefined in descendants as:
getFieldSearchSQL (line 844)

Get field search SQL request (used by class CMS_object_search)

  • return: : the SQL request
  • access: public
string getFieldSearchSQL (integer $fieldID, mixed $value, string $operator, string $where, [boolean $public = false])
  • integer $fieldID: : this field id in object (aka $this->_field->getID())
  • mixed $value: : the value to search
  • string $operator: : additionnal search operator
  • string $where: : where clauses to add to SQL
  • boolean $public: : values are public or edited ? (default is edited)

Redefined in descendants as:
getHTMLAdmin (line 189)

get HTML admin (used to enter object values in admin)

  • return: : the html admin
  • access: public
string getHTMLAdmin ( $fieldID,  $language, string $prefixName, integer $fieldID,, CMS_language $language,)
  • integer $fieldID,: the current field id (only for poly object compatibility)
  • CMS_language $language,: the current admin language
  • string $prefixName: prefixname : the prefix to use for post names
  • $fieldID
  • $language

Redefined in descendants as:
getHTMLDescription (line 375)

get object HTML description for admin search detail. Usually, the label.

  • return: : object HTML description
  • access: public
string getHTMLDescription ()

Redefined in descendants as:
getHTMLSubFieldsParameters (line 458)

get HTML admin subfields parameters (used to enter object parameters values in admin)

  • return: : the html admin
  • access: public
string getHTMLSubFieldsParameters ( $language,  $prefixName)
  • $language
  • $prefixName
getInput (line 256)

Return the needed form field tag for current object field

  • return: : the form field HTML tag
  • access: public
string getInput ( $fieldID, multidimentionnal $language,  $inputParams, array $values)
  • array $values: : parameters values array(parameterName => parameterValue) in : id : the form field id to set
  • multidimentionnal $language: array $tags : xml2Array content of atm-function tag
  • $fieldID
  • $inputParams

Redefined in descendants as:
getLabel (line 345)

get object label : by default, the first subField value (used to designate this object in lists)

  • return: : the label
  • access: public
string getLabel ()

Redefined in descendants as:
getLabelsStructure (line 821)

get labels for object structure and functions

  • return: : the labels of object structure and functions
  • access: public
array getLabelsStructure ( &$language, [ $objectName = ''])
  • &$language
  • $objectName

Redefined in descendants as:
getObjectLabel (line 360)

get admin object label

  • return: the label
  • access: public
string, getObjectLabel (mixed $language)
  • mixed $language: the language code (string) or the CMS_language (object) to use for label

Redefined in descendants as:
getParamsValues (line 581)

get array of object parameters indexed with parameter internalName

  • return: internalName => mixed parameter value)
  • access: public
array(string getParamsValues ()
getParamValue (line 615)

Get a parameter value

  • return: : the parameter value or null if it does not exists
  • access: public
mixed getParamValue (string $paramName)
  • string $paramName: : the parameter name to get value of
getSoapValues (line 737)

Get soap values

  • return: XML definition
  • access: public
string getSoapValues ( $fieldID,  $language)
  • $fieldID
  • $language
getStructure (line 680)

get object values structure available with getValue method

  • return: array : the object values structure
  • access: public
multidimentionnal getStructure ()

Redefined in descendants as:
getSubFieldParameters (line 438)

get subfields parameters

  • return: parameterID => array parameter) : the subfield parameters
  • access: public
array(integer getSubFieldParameters ()
getSubFieldsDefinition (line 626)

Get subfields definition for current object

  • return: "subFieldID" => array("type" => string [integer|string|text|date], "objectID" => integer, "fieldID" => integer, "subFieldID" => integer))
  • access: public
array(integer getSubFieldsDefinition (integer $objectID)
  • integer $objectID: (can be null) $objectID the object ID who requests these infos

Redefined in descendants as:
getValue (line 700)

get an object value

  • return: array : the object values structure
  • access: public
multidimentionnal getValue (string $name, [string $parameters = ''])
  • string $name: : the name of the value to get
  • string $parameters: (optional) : parameters for the value to get

Redefined in descendants as:
hasParameters (line 448)

has subfields parameters ?

  • access: public
boolean hasParameters ()
setParamValue (line 598)

Set a parameter value (this value is not saved, it is only changed for the current object instance)

  • return: : true on success, false on failure
  • access: public
boolean setParamValue ( $name, string $value, string $paramName)
  • string $paramName: : the parameter name to get value of
  • string $value: : the parameter value to set
  • $name
setSoapValues (line 771)

Set soap values

  • return: true or false
  • access: public
boolean setSoapValues (integer $fieldID, $domdocument $domdocument, [$itemId $itemId = ''])
  • integer $fieldID: The field ID
  • $domdocument $domdocument: XML values to set
  • $itemId $itemId: the ID of the polyobject item, if any (necessary for some fields (image, file, etc...)
setSubFieldsDefinition (line 645)

Set subfields definition for current object

  • return: true on success, false on failure
  • access: public
boolean setSubFieldsDefinition ($subFieldsDefinition $subFieldsDefinition)
  • $subFieldsDefinition $subFieldsDefinition: array(integer "subFieldID" => array("type" => string [integer|string|text|date], "objectID" => integer, "fieldID" => integer, "subFieldID" => integer))

Redefined in descendants as:
setValues (line 302)

set object Values

  • return: true on success, false on failure
  • access: public
boolean setValues (array $values, string $prefixName, [boolean $newFormat = false])
  • array $values: : the POST result values
  • string $prefixName: prefixname : the prefix used for post names
  • boolean $newFormat: newFormat : new automne v4 format (default false for compatibility)

Redefined in descendants as:
treatParams (line 538)

treat all params then return array of values treated or false if error

  • return: the treated datas
  • access: public
array, treatParams (array $post, string $prefix)
  • array $post: the posted datas
  • string $prefix: the prefix for datas name

Redefined in descendants as:
writeToPersistence (line 660)

Writes all subobjects into persistence (MySQL for now), along with base data.

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

Redefined in descendants as:

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_FIELD_NO = 1083 (line 33)
MESSAGE_FIELD_YES = 1082 (line 32)

Standard Messages

MESSAGE_OBJECT_COMMON_FIELDID_DESCRIPTION = 119 (line 40)
MESSAGE_OBJECT_COMMON_FIELDNAME_DESCRIPTION = 118 (line 39)
MESSAGE_OBJECT_COMMON_FIELD_DESC_DESCRIPTION = 402 (line 45)
MESSAGE_OBJECT_COMMON_LABEL_DESCRIPTION = 117 (line 38)

Polymod Messages

MESSAGE_OBJECT_COMMON_REQUIRED_DESCRIPTION = 366 (line 44)
MESSAGE_OBJECT_COMMON_VALUE_DESCRIPTION = 120 (line 41)
MESSAGE_UNKNOWN_OBJECT_DESCRIPTION = 1250 (line 43)
MESSAGE_UNKNOWN_OBJECT_LABEL = 1249 (line 42)

Inherited Constants

Inherited from CMS_grandFather

CMS_grandFather::ERROR_LOG
CMS_grandFather::SYSTEM_LABEL

Documentation generated on Wed, 15 Feb 2012 15:33:31 +0100 by phpDocumentor 1.4.3