Class CMS_multi_poly_object

Description

Class CMS_multi_poly_object

represent a collection of polymorphic objects

Located in /automne/classes/modules/polymod/polyobjects/multi_poly_object.php (line 27)

CMS_grandFather
   |
   --CMS_object_common
      |
      --CMS_multi_poly_object
Class Constant Summary
Method Summary
 static array(integer getListOfNamesForObject ([boolean $public = false], [ $searchConditions = array()], array $searchConditions,)
 boolean checkMandatory (array $values, string $prefixName, [boolean $newFormat = false])
 string, getDescription (mixed $language)
 string getFieldSearchSQL (integer $fieldID, mixed $value, string $operator, string $where, [boolean $public = false])
 string getHTMLAdmin ( $fieldID, string $language,  $prefixName, CMS_language $language,)
 string getHTMLDescription ([string $glue = ''])
 string getHTMLSubFieldsParametersSearch ( $language,  $prefixName)
 array, getIDs ()
 string getInput ( $fieldID, multidimentionnal $language,  $inputParams, array $values)
 array getLabelsStructure ( &$language,  $objectName)
 integer, getObjectID ()
 string, getObjectLabel (mixed $language)
 multidimentionnal getStructure ()
 array(integer getSubFieldsDefinition (integer $objectTypeID, integer $objectID,  $field, CMS_poly_object_field $field,)
 multidimentionnal getValue (string $name, [string $parameters = ''])
 void __construct (integer $objectID, [array $datas = array()],  $field, [CMS_object_field $public = false], boolean $public,)
 mixed objectValues (integer $fieldID)
 boolean populateSubObjectsValues (array $datas)
 string selectOptions (array $values, multidimentionnal $tags)
 boolean setSubFieldsDefinition ($subFieldsDefinition $subFieldsDefinition)
 boolean setValues (array $values, string $prefixName, [boolean $newFormat = false])
 boolean writeToPersistence ()
Methods
static getListOfNamesForObject (line 1158)

Return a list of all objects names of given type

  • return: objectID => string objectName)
  • access: public
static array(integer getListOfNamesForObject ([boolean $public = false], [ $searchConditions = array()], array $searchConditions,)
  • boolean $public: are the needed datas public ? (default false)
  • array $searchConditions,: search conditions to add. Format : array(conditionType => conditionValue)
  • $searchConditions
checkMandatory (line 894)

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)

Redefinition of:
CMS_object_common::checkMandatory()
check object Mandatories Values
getDescription (line 381)

get 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

Redefinition of:
CMS_object_common::getDescription()
get admin object description
getFieldSearchSQL (line 1173)

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

Redefinition of:
CMS_object_common::getFieldSearchSQL()
Get field search SQL request (used by class CMS_object_search)
getHTMLAdmin (line 452)

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

  • return: : the html admin
  • access: public
string getHTMLAdmin ( $fieldID, string $language,  $prefixName, CMS_language $language,)
  • CMS_language $language,: the current admin language
  • string $language: prefixname : the prefix to use for post names
  • $fieldID
  • $prefixName

Redefinition of:
CMS_object_common::getHTMLAdmin()
get HTML admin (used to enter object values in admin)
getHTMLDescription (line 870)

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

  • return: : object HTML description
  • access: public
string getHTMLDescription ([string $glue = ''])
  • string $glue: : string glue between each objets labels (default : comma)

Redefinition of:
CMS_object_common::getHTMLDescription()
get object HTML description for admin search detail. Usually, the label.
getHTMLSubFieldsParametersSearch (line 401)

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

  • return: : the html admin
  • access: public
string getHTMLSubFieldsParametersSearch ( $language,  $prefixName)
  • $language
  • $prefixName
getIDs (line 237)

Get all associated object ids

  • return: the associated object ids
  • access: public
array, getIDs ()
getInput (line 802)

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

Redefinition of:
CMS_object_common::getInput()
Return the needed form field tag for current object field
getLabelsStructure (line 1130)

get labels for object structure and functions

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

Redefinition of:
CMS_object_common::getLabelsStructure()
get labels for object structure and functions
getObjectDefinition (line 342)

Get object Definition (CMS_poly_object_definition)

  • access: public
CMS_poly_object_definition getObjectDefinition ()
getObjectID (line 226)

Get object ID

  • return: the DB object ID
  • access: public
integer, getObjectID ()
getObjectLabel (line 363)

get object label (same as getLabel, for objects compatibility)

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

Redefinition of:
CMS_object_common::getObjectLabel()
get admin object label
getObjectResourceStatus (line 255)

get object resource status beware, for secondary resources, real status is not checked, use isSecondaryResource method of CMS_poly_object_definition instead

  • return: the object resource status
  • access: public
integer, getObjectResourceStatus ()
getStructure (line 1007)

get object values structure available with getValue method

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

Redefinition of:
CMS_object_common::getStructure()
get object values structure available with getValue method
getSubFieldsDefinition (line 954)

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 $objectTypeID, integer $objectID,  $field, CMS_poly_object_field $field,)
  • integer $objectTypeID: the object type ID who requests these infos
  • CMS_poly_object_field $field,: the object field
  • integer $objectID: (can be null) $objectID the object ID who requests these infos
  • $field

Redefinition of:
CMS_object_common::getSubFieldsDefinition()
Get subfields definition for current object
getValue (line 1047)

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

Redefinition of:
CMS_object_common::getValue()
get an object value
Constructor __construct (line 178)

Constructor.

initialize object.

  • access: public
void __construct (integer $objectID, [array $datas = array()],  $field, [CMS_object_field $public = false], boolean $public,)
  • integer $objectID: the object type id in catalog (relative to id in mod_object_def table)
  • array $datas: the object and sub objects values
  • boolean $public,: object values are public or edited ? (default is edited)
  • CMS_object_field $public: reference
  • $field

Redefinition of:
CMS_object_common::__construct()
Constructor.
objectValues (line 1028)

get an object field

  • return: : the object field
  • access: public
mixed objectValues (integer $fieldID)
  • integer $fieldID: : the field to get
populateSubObjectsValues (line 268)

Sets subobjects Values

  • return: true on success, false on failure
  • access: private
boolean populateSubObjectsValues (array $datas)
  • array $datas: datas : array created by parent loadObject method array(integer objectID => array(integer objectFieldID => array(integer objectSubFieldID => array(DB values))))
selectOptions (line 1112)

For a given object type, return options tag list (for a select tag) of all objects labels

  • return: : options tag list
  • access: public
string selectOptions (array $values, multidimentionnal $tags)
  • array $values: : parameters values array(parameterName => parameterValue) in : selected : the object id which is selected (optional)
  • multidimentionnal $tags: array $tags : xml2Array content of atm-function tag (nothing for this one)
setSubFieldsDefinition (line 971)

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

Redefinition of:
CMS_object_common::setSubFieldsDefinition()
Set subfields definition for current object
setValues (line 917)

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)

Redefinition of:
CMS_object_common::setValues()
set object Values
writeToPersistence (line 987)

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

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

Redefinition of:
CMS_object_common::writeToPersistence()
Writes all subobjects into persistence (MySQL for now), along with base data.
_loadSubObjectsValues (line 310)

load all subobjects values from DB

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

Inherited Methods

Inherited From CMS_object_common

 CMS_object_common::__construct()
 CMS_object_common::asArray()
 CMS_object_common::checkMandatory()
 CMS_object_common::getDescription()
 CMS_object_common::getFieldDescription()
 CMS_object_common::getFieldLabel()
 CMS_object_common::getFieldOrderSQL()
 CMS_object_common::getFieldSearchSQL()
 CMS_object_common::getHTMLAdmin()
 CMS_object_common::getHTMLDescription()
 CMS_object_common::getHTMLSubFieldsParameters()
 CMS_object_common::getInput()
 CMS_object_common::getLabel()
 CMS_object_common::getLabelsStructure()
 CMS_object_common::getObjectLabel()
 CMS_object_common::getParamsValues()
 CMS_object_common::getParamValue()
 CMS_object_common::getSoapValues()
 CMS_object_common::getStructure()
 CMS_object_common::getSubFieldParameters()
 CMS_object_common::getSubFieldsDefinition()
 CMS_object_common::getValue()
 CMS_object_common::hasParameters()
 CMS_object_common::serializeHTMLParameters()
 CMS_object_common::setParamValue()
 CMS_object_common::setSoapValues()
 CMS_object_common::setSubFieldsDefinition()
 CMS_object_common::setValues()
 CMS_object_common::treatParams()
 CMS_object_common::writeToPersistence()

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_CHOOSE_OBJECT = 1132 (line 63)
MESSAGE_EMPTY_OBJECTS_SET = 265 (line 62)
MESSAGE_MULTI_OBJECT_ADD_ZONE = 196 (line 46)
MESSAGE_MULTI_OBJECT_CHOOSE_ELEMENT = 518 (line 60)
MESSAGE_MULTI_OBJECT_COUNT_DESCRIPTION = 149 (line 39)
MESSAGE_MULTI_OBJECT_CREATE_ZONE = 193 (line 43)
MESSAGE_MULTI_OBJECT_DESCRIPTION = 191 (line 41)
MESSAGE_MULTI_OBJECT_DISASSOCIATE_ELEMENT = 517 (line 59)
MESSAGE_MULTI_OBJECT_EDIT_ELEMENT = 516 (line 58)
MESSAGE_MULTI_OBJECT_EDIT_ZONE = 194 (line 44)
MESSAGE_MULTI_OBJECT_FIELDID_DESCRIPTION = 119 (line 34)
MESSAGE_MULTI_OBJECT_FIELDNAME_DESCRIPTION = 118 (line 33)
MESSAGE_MULTI_OBJECT_FIELDS_DESCRIPTION = 148 (line 36)
MESSAGE_MULTI_OBJECT_FIELD_DESC_DESCRIPTION = 402 (line 57)
MESSAGE_MULTI_OBJECT_FUNCTION_SELECTOPTIONS_DESCRIPTION = 162 (line 50)
MESSAGE_MULTI_OBJECT_IDS_DESCRIPTION = 398 (line 56)
MESSAGE_MULTI_OBJECT_LABEL = 190 (line 40)
MESSAGE_MULTI_OBJECT_LABEL_DESCRIPTION = 363 (line 32)

Polymod Messages

MESSAGE_MULTI_OBJECT_LIST_ZONE = 195 (line 45)
MESSAGE_MULTI_OBJECT_OBJECTDESC_DESCRIPTION = 144 (line 38)
MESSAGE_MULTI_OBJECT_OBJECTNAME_DESCRIPTION = 143 (line 37)
MESSAGE_MULTI_OBJECT_OBJECTTYPE_DESCRIPTION = 145 (line 35)
MESSAGE_MULTI_OBJECT_PARAMETER_DONOTUSEEXTERNALSUBOBJECTS = 332 (line 53)
MESSAGE_MULTI_OBJECT_PARAMETER_DONOTUSEEXTERNALSUBOBJECTS_DESCRIPTION = 333 (line 54)
MESSAGE_MULTI_OBJECT_PARAMETER_EDITABLE = 192 (line 42)
MESSAGE_MULTI_OBJECT_PARAMETER_INDEXONLYLASTSUBOBJECTS = 330 (line 51)
MESSAGE_MULTI_OBJECT_PARAMETER_INDEXONLYLASTSUBOBJECTS_DESCRIPTION = 331 (line 52)
MESSAGE_MULTI_OBJECT_PARAMETER_LOADSUBOBJECTS = 197 (line 47)
MESSAGE_MULTI_OBJECT_PARAMETER_LOADSUBOBJECTS_DESCRIPTION = 198 (line 48)
MESSAGE_MULTI_OBJECT_PARAMETER_SEARCHEDOBJECTS = 199 (line 49)
MESSAGE_MULTI_OBJECT_REQUIRED_DESCRIPTION = 366 (line 55)
MESSAGE_MULTI_OBJECT_SELECT_BEFORE = 608 (line 69)
MESSAGE_PAGE_ACTION_ASSOCIATE = 1267 (line 67)
MESSAGE_PAGE_ACTION_DESASSOCIATE = 1268 (line 66)
MESSAGE_PAGE_ACTION_DESASSOCIATE_CONFIRM = 607 (line 68)
MESSAGE_PAGE_ACTION_MODIFIY = 261 (line 64)
MESSAGE_PAGE_ACTION_NEW = 262 (line 65)

Inherited Constants

Inherited from CMS_object_common

CMS_object_common::MESSAGE_FIELD_NO
CMS_object_common::MESSAGE_FIELD_YES
CMS_object_common::MESSAGE_OBJECT_COMMON_FIELDID_DESCRIPTION
CMS_object_common::MESSAGE_OBJECT_COMMON_FIELDNAME_DESCRIPTION
CMS_object_common::MESSAGE_OBJECT_COMMON_FIELD_DESC_DESCRIPTION
CMS_object_common::MESSAGE_OBJECT_COMMON_LABEL_DESCRIPTION
CMS_object_common::MESSAGE_OBJECT_COMMON_REQUIRED_DESCRIPTION
CMS_object_common::MESSAGE_OBJECT_COMMON_VALUE_DESCRIPTION
CMS_object_common::MESSAGE_UNKNOWN_OBJECT_DESCRIPTION
CMS_object_common::MESSAGE_UNKNOWN_OBJECT_LABEL

Inherited from CMS_grandFather

CMS_grandFather::ERROR_LOG
CMS_grandFather::SYSTEM_LABEL

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