Class CMS_poly_object_definition

Description

Class CMS_poly_object_definition

represent a poly object definition

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

CMS_grandFather
   |
   --CMS_poly_object_definition
Direct descendents
Class Description
 class CMS_poly_object_field Class CMS_poly_object_field
Class Constant Summary
Method Summary
 void __construct ([integer $id = 0], [array $dbValues = array()])
 array asArray ([array $params = array()],  &$files, array $files)
 boolean compileDefinition ()
 boolean convertDefinitions (CMS_module $module)
 boolean destroy ()
 boolean fromArray (array $data, array $params, CMS_language $cms_language,  &$idsRelation,  &$infos, array $idsRelation, string $infos)
 string, getDescription (mixed $language)
 string getHTMLSubFieldsParameters ( $language,  $prefixName)
 string getHTMLSubFieldsParametersSearch ( $language, [ $prefixName = ''], [ $selectedValues = false], [ $disableSelected = false])
 integer, getID ()
 string, getLabel ([mixed $language = ''])
 string, getObjectLabel (mixed $language)
 array(string getParamsValues ()
 multidimentionnal getStructure ()
 array(integer getSubFieldParameters ()
 mixed, getValue (string $valueName)
 boolean hasCategories ()
 boolean hasParameters ()
 boolean isPrimaryResource ()
 boolean isSecondaryResource ([boolean $dontCheckForPrimaryResourceAttachment = false])
 boolean loadParameters ( &$field)
 void setUuid (string $uuid)
 boolean setValue (string $valueName, mixed $value)
 array, treatParams (array $post, string $prefix)
 boolean writeToPersistence ()
Methods
Constructor __construct (line 121)

Constructor.

initialize object.

  • access: public
void __construct ([integer $id = 0], [array $dbValues = array()])
  • integer $id: DB id
  • array $dbValues: DB values

Redefined in descendants as:
asArray (line 709)

Get object as an array structure used for export

  • return: : the object array structure
  • access: public
array asArray ([array $params = array()],  &$files, array $files)
  • array $params: The export parameters. Not used here
  • array $files: The reference to the founded files used by object
  • &$files

Redefined in descendants as:
compileDefinition (line 225)

Compile the indexURL definition

  • return: true on success, false on failure
  • access: public
boolean compileDefinition ()
convertDefinitions (line 946)

Convert all definitions used by this object from human format to Automne format.

This method is usually used at end of module import process, when all objects are imported

  • return: : true on success, false on failure
  • access: public
boolean convertDefinitions (CMS_module $module)

Redefined in descendants as:
destroy (line 627)

Destroy this object in DB

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

Redefined in descendants as:
fromArray (line 773)

Import object from given array datas

  • return: : true on success, false on failure
  • access: public
boolean fromArray (array $data, array $params, CMS_language $cms_language,  &$idsRelation,  &$infos, array $idsRelation, string $infos)
  • array $data: The object datas to import
  • array $params: The import parameters. array( module => false|true : the module to create object (required) create => false|true : create missing objects (default : true) update => false|true : update existing objects (default : true) files => false|true : use files from PATH_TMP_FS (default : true) )
  • CMS_language $cms_language: The CMS_langage to use
  • array $idsRelation: : Reference : The relations between import datas ids and real imported ids
  • string $infos: : Reference : The import infos returned
  • &$idsRelation
  • &$infos

Redefined in descendants as:
getDescription (line 286)

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
getHTMLSubFieldsParameters (line 343)

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
getHTMLSubFieldsParametersSearch (line 403)

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

  • return: : the html admin
  • access: public
string getHTMLSubFieldsParametersSearch ( $language, [ $prefixName = ''], [ $selectedValues = false], [ $disableSelected = false])
  • $language
  • $prefixName
  • $selectedValues
  • $disableSelected
getID (line 171)

Get object ID

  • return: the DB object ID
  • access: public
integer, getID ()

Redefined in descendants as:
getLabel (line 259)

get object label

  • return: the label
  • access: public
string, getLabel ([mixed $language = ''])
  • mixed $language: the language code (string) or the CMS_language (object) to use for label
getObjectLabel (line 275)

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
getParamsValues (line 498)

get array of object parameters indexed with parameter internalName

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

get object values structure available with getValue method

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

get subfields parameters

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

get an object value.

  • return: the value
  • access: public
mixed, getValue (string $valueName)
  • string $valueName: the name of the value to get

Redefined in descendants as:
hasCategories (line 557)

is this object use categories ?

  • access: public
boolean hasCategories ()
hasParameters (line 315)

has subfields parameters ?

  • access: public
boolean hasParameters ()
isPrimaryResource (line 517)

is this object a primary resource ?

  • access: public
boolean isPrimaryResource ()
isSecondaryResource (line 530)

is this object a secondary resource ? Note : even if this object is declared as a secondary resource, object must be directly attached to a primary resource, else it is not a secondary resource

  • access: public
boolean isSecondaryResource ([boolean $dontCheckForPrimaryResourceAttachment = false])
  • boolean $dontCheckForPrimaryResourceAttachment: : do not check for a primary resource attachement, consider it is already checked somewhere else.
loadParameters (line 325)

load parameters from field

  • access: public
boolean loadParameters ( &$field)
  • &$field
setUuid (line 215)

Sets a object uuid.

  • access: public
void setUuid (string $uuid)
  • string $uuid: the object UUID
setValue (line 184)

Sets an object value.

  • return: true on success, false on failure
  • access: public
boolean setValue (string $valueName, mixed $value)
  • string $valueName: the name of the value to set
  • mixed $value: the value to set

Redefined in descendants as:
treatParams (line 449)

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
writeToPersistence (line 567)

Writes object 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_PARAMETER_LOADSUBOBJECTS = 197 (line 38)

Polymod Messages

MESSAGE_OBJECT_PARAMETER_LOADSUBOBJECTS_DESCRIPTION = 198 (line 39)
MESSAGE_OBJECT_PARAMETER_SEARCHEDOBJECTS = 199 (line 40)

Inherited Constants

Inherited from CMS_grandFather

CMS_grandFather::ERROR_LOG
CMS_grandFather::SYSTEM_LABEL

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