Current object has passed the validation process
static boolean
afterValidation
(integer $validationResult)
-
integer
$validationResult: : the validation status
Return a list of all objects names of given type
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
Constructor.
initialize object.
void
__construct
(integer $objectID, [integer $id = 0], [array $datas = array()], [ $public = false], [ $loadObject = true], [ $loadSubObjectsValues = true], boolean $public,, boolean $loadObject,, boolean $loadSubObjectsValues,)
-
integer
$objectID: the object type id in catalog (relative to id in mod_object_def table)
-
integer
$id: the object id (relative to id in mod_object_polyobjects table)
-
array
$datas: the object and sub objects values
-
boolean
$public,: object values are public or edited ? (default is edited)
-
boolean
$loadObject,: load object values from db if not found in params ?
-
boolean
$loadSubObjectsValues,: /!\ Experimental /!\ Load subobjects datas. Default : true. Only for public objects. in case of large objects to manage, we can limit the memory usage by disallow loading of sub objects datas structure.
-
$public
-
$loadObject
-
$loadSubObjectsValues
check object Mandatories Values
boolean
checkMandatory
( $fieldID, string $values, boolean $prefixName, [ $newFormat = false])
-
string
$values: prefixname : the prefix used for post names
-
boolean
$prefixName: newFormat : new automne v4 format (default false for compatibility)
-
$fieldID
-
$newFormat
Delete object and values.
If object is a primary resource, this deletion is submitted to validation and an email is sent to validators.
boolean
delete
([boolean $hardDelete = false])
-
boolean
$hardDelete: : completely destroy object and associated resource if any. After this, this object will no longer exists at all. Default : false. /!\ if object is a primary resource, no validation will be queried to validators, object will be directly destroyed from all locations. /!\
get all secondary resources ids attached to this primary resource
array
getAllSecondaryResourcesForPrimaryResource
()
get admin field description
string,
getFieldDesc
(mixed $language)
-
mixed
$language: the language code (string) or the CMS_language (object) to use for label
get admin field label
string,
getFieldLabel
(mixed $language)
-
mixed
$language: the language code (string) or the CMS_language (object) to use for label
Get field order SQL request (used by class CMS_object_search)
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)
Get field search SQL request (used by class CMS_object_search)
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)
Get all subobject
array
getFieldsObjects
()
get HTML admin (used to enter object values in admin)
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
get object HTML description for admin search detail. Usually, the label.
string
getHTMLDescription
()
Return the needed form field tag for current object field
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
get object label (composed by some objects fields)
string
getLabel
()
get labels for object structure and functions
array
getLabelsStructure
( &$language, $objectName)
get object language if any language field exists else, return APPLICATION_DEFAULT_LANGUAGE
integer,
getLanguage
()
Get languages for object from
- Categories (which support multi language)
- Sub object multiple which has a language field
array
getLanguages
()
Get object Definition (CMS_poly_object_definition)
Get object ID
integer,
getObjectID
()
get object resource status beware, for secondary resources, real status is not checked, use isSecondaryResource method of CMS_poly_object_definition instead
integer,
getObjectResourceStatus
()
get object previzualisation URL if set
string
getPrevizPageURL
([boolean $addPrevizParameter = true])
-
boolean
$addPrevizParameter: : add the previz=previz parameter at end of address (default : true)
Get object publication date If object is a primary resource, return resource pub date else, try to find a date field with creation date
CMS_date,
getPublicationDate
()
Get soap values
string
getSoapValues
(integer $fieldID, object $language)
-
integer
$fieldID: The field ID
-
object
$language: The CMS_language to deal with
get object values structure available with getValue method
multidimentionnal
getStructure
()
Get subfields definition for current object
array(integer
getSubFieldsDefinition
([integer $objectID = ""])
-
integer
$objectID: (can be null - for compatibility only) $objectID the object ID who requests these infos
get object type label
string
getTypeLabel
(mixed $language)
-
mixed
$language: the language code (string) or the CMS_language (object) to use for label
get an object value
mixed
getValue
(string $name, [string $parameters = ''])
-
string
$name: : the name of the value to get
-
string
$parameters: (optional) : parameters for the value to get
Is this object deleted
boolean
isDeleted
()
Is this object currently in userspace return true if object is not deleted (for edited object) and if object is valided and in range of publications date (for public primary resource object)
multidimentionnal
isInUserSpace
(boolean $public)
-
boolean
$public: : public userspace (else, it is edited userpsace) default : false
For an object ID, set object
void
loadObject
(array $values, multidimentionnal $tags)
-
array
$values: : parameters values array(parameterName => parameterValue) in : value : the object id which to be set
-
multidimentionnal
$tags: array $tags : xml2Array content of atm-function tag (nothing for this one)
get an object field
mixed
objectValues
([integer $fieldID = ''])
-
integer
$fieldID: : the field to get. If empty, return an array of all objects values
Return given RSS feed informations
string
rss
(array $values, multidimentionnal $tags)
-
array
$values: : parameters values array(parameterName => parameterValue) in : selected : the selected rss ID
-
multidimentionnal
$tags: array $tags : xml2Array content of atm-function tag ... {url} ... {label} ... {description} ...
Module script info : get infos for a given script parameters
string
scriptInfo
(array $parameters)
-
array
$parameters: the task parameters task : string task to execute module : string module codename for the task uid : string module uid
Module script task
Boolean
scriptTask
(array $parameters)
-
array
$parameters: the task parameters task : string task to execute object : string module codename for the task field : string module uid ... : optional field relative parameters
For a given object type, return options tag list (for a select tag) of all objects labels
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)
set CMS_poly_object_field reference (only if this object is used as a field of another object)
void
setField
($field $field)
-
$field
$field: CMS_poly_object_field : the field reference for this object
Get soap values
boolean
setSoapValues
(integer $fieldID, $domdocument, object $language, string $xml)
-
integer
$fieldID: The field ID
-
object
$language: The CMS_language to deal with
-
string
$xml: Values to set
-
$domdocument
set fields objects Values
boolean
setValues
(integer $fieldID, array $values, $prefix, [boolean $newFormat = false], string $prefixname)
-
integer
$fieldID: : the object field id to set values
-
array
$values: : the POST result values
-
string
$prefixname: : the prefix used for post names
-
boolean
$newFormat: newFormat : new automne v4 format (default false for compatibility)
-
$prefix
Un-delete an object proposed for deletion (only for primary resource object type)
boolean
undelete
()
Does given user have the requested clearance for this object ? This method is pretty heavy, so if it must be used on a lots of objects, prefer usage of a search on those objects, it is much faster.
boolean
userHasClearance
(cms_profile_user $user, [constant $clearance = CLEARANCE_MODULE_VIEW], [boolean $checkParent = false])
-
cms_profile_user
$user: : the user to check clearance
-
constant
$clearance: : the requested clearance to check (default : CLEARANCE_MODULE_VIEW)
-
boolean
$checkParent: : if no categories fields founded, check the parent object (if any) to see if it as some (beware this is heavy). Default : false
Writes all objects values into persistence (MySQL for now), along with base data.
boolean
writeToPersistence
([ $treatResource = true], [boolean $emailValidators = true], [boolean $onlyCreateID = false], boolean $withResource)
-
boolean
$withResource: treat also the resource status (if object is a primary resource) default true
-
boolean
$emailValidators: send emails to validators (if object is a primary resource) default true
-
boolean
$onlyCreateID: create only the object ID (used to save fiels fields). Default false
-
$treatResource
Redefinition of:
- CMS_resource::writeToPersistence()
- Writes the resource into persistence (MySQL for now).
load all object and subobjects values from DB
boolean
_loadObject
()
Sets clean subobjects
boolean
_populateSubObjects
()
Sets subObjectsDefinitions
boolean
_populateSubObjectsDefinitions
()
Sets subobjects Values
boolean
_populateSubObjectsValues
(array $datas)
-
array
$datas: datas : array created by loadObject method array(integer objectID => array(integer objectFieldID => array(integer objectSubFieldID => array(DB values))))
Inherited Methods
Inherited From CMS_resource
CMS_resource::CMS_resource()
CMS_resource::addEdition()
CMS_resource::addValidationRefused()
CMS_resource::cancelAllEditions()
CMS_resource::destroy()
CMS_resource::getAllDataLocations()
CMS_resource::getAllLinkTypes()
CMS_resource::getEditors()
CMS_resource::getEditorsStack()
CMS_resource::getID()
CMS_resource::getLocation()
CMS_resource::getLock()
CMS_resource::getLockDate()
CMS_resource::getProposedLocation()
CMS_resource::getPublication()
CMS_resource::getPublicationDateEnd()
CMS_resource::getPublicationDateStart()
CMS_resource::getStatus()
CMS_resource::isProposedForOutsideUserspace()
CMS_resource::lock()
CMS_resource::removeProposedLocation()
CMS_resource::resetEditorsStack()
CMS_resource::setProposedLocation()
CMS_resource::setPublicationDates()
CMS_resource::unlock()
CMS_resource::validateEdition()
CMS_resource::validateProposedLocation()
CMS_resource::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()