ezcontentobject

Summary

Contains information about a content object.

Persistent

Yes.

Attributes

Attribute

Type

Static*

Description

id

string

Yes.

The ID number of the object.

section_id

string

Yes.

The ID number of the section that the object belongs to.

owner_id

string

Yes.

The ID number of the object representing the user who initially created the object.

contentclass_id

string

Yes.

The ID number of the content class which the object is an instance of.

is_published

string

Yes.

Either 1 or 0. 1 means that the object has been published. 0 means that the object has not yet been published.

published

string

Yes.

A UNIX timestamp pinpointing the exact date/time when the object was published for the first time.

modified

string

Yes.

A UNIX timestamp pinpointing the exact date/time when the object was last modified.

current_version

string

Yes.

The number of the currently published version.

status

string

Yes.

The status of the object (0=Draft, 1=Published, 2=Archived).

remote_id

string

Yes.

A global unique ID for the object. The remote ID is an MD5 hash of the time when the object was created plus a random value. Remote IDs are used in order to avoid collisions of identical objects during an import.

language_mask

string

Yes.

The sum of the ID numbers of the languages in which the last published version of the object exists. Please note that the ID numbers are powers of 2. 1 (2^0) is reserved for marking objects that should always be available. Objects that are always available will be fetched even if they do not exist in any of the site/prioritized languages (the initial/main language of the object will be used).

initial_language_id

string

Yes.

The ID number of the initial/main language.

current

object

No.

The current version (as ezcontentobjectversion) of the object.

versions

array

No.

The object's versions (as ezcontentobjectversion objects).

author_array

array

No.

Array of ezuser objects representing the different creators of the content object's versions.

class_name

string

No.

The name of the class which the content object is an instance of (for example "Consumer product").

content_class

object

No.

The content class (as ezcontentclass) which the content object is an instance of.

contentobject_attributes

array

No.

Array of ezcontentobjectattribute objects representing the attributes of the content object.

owner

object

No.

An ezcontentobject that represents the user who initially created the object.

related_contentobject_array

array

No.

An array of ezcontentobject objects that are related to this object. This attribute is deprecated. It is recommended to use the " related_objects" fetch function instead.

related_contentobject_count

string

No.

The number of objects that are related to this object. This attribute is deprecated. It is recommended to use the " related_objects_count" fetch function instead.

reverse_related_contentobject_array

array

No.

An array of ezcontentobject objects that make use of this object (reverse relations). This attribute is deprecated. It is recommended to use the " reverse_related_objects" fetch function instead.

reverse_related_contentobject_count

string

No.

The number of objects that are using this object. This attribute is deprecated. It is recommended to use the " reverse_related_objects_count" fetch function instead.

can_read

boolean

No.

Returns TRUE if the current user has read access to the object, FALSE otherwise.

can_pdf

boolean

No.

Not documented yet.

can_diff

boolean

No.

Not documented yet.

can_create

boolean

No.

Not documented yet.

can_create_class_list

array

No.

Not documented yet.

can_edit

boolean

No.

Returns TRUE if the current user has edit access to the object, FALSE otherwise.

can_translate

boolean

No.

Returns TRUE if the current user has permissions to translate the contents of the object, FALSE otherwise.

can_remove

boolean

No.

Returns TRUE if the current user has permissions to remove the object, FALSE otherwise.

can_move

boolean

No.

Not documented yet.

can_move_from

boolean

No.

Returns TRUE if the current user has permissions to move the main node of the object, FALSE otherwise.

can_view_embed

boolean

No.

Not documented yet.

data_map

array

No.

Array of ezcontentobjectattribute objects representing the actual attributes of the content object.

main_parent_node_id

string

No.

The ID number of the main node of the object encapsulated by the parent node.

assigned_nodes

array

No.

Array of nodes (as ezcontentobjecttreenode objects) that encapsulate the object.

parent_nodes

array

No.

An array of ID numbers of the parent nodes (as strings).

main_node_id

string

No.

The ID number of the object's main node.

main_node

object

No.

The object's main node (as ezcontentobjecttreenode).

default_language

string

No.

The default language for content objects (see ContentObjectLocale) if it is set or the most prioritized language (i.e. the first element of the "SiteLanguageList" array).

content_action_list

array

No.

An array of hashes revealing information about the content actions that can be performed on the object. The keys "name" and "action" contain the actual name (for example "Add to basket" - which should be value of the HTML input tag) and the action itself (for example "ActionAddToBasket" - which should be the name of the HTML input tag). The array is generated by a function that examines the object's attributes. If a datatype used to represent an attribute provides support for content actions or if the attribute is an information collector, the supported actions will be added to the "content_action_list" array. This array can be used to automatically generate action buttons (standard HTML buttons) for content objects that either make use of special datatypes or have attributes that are marked as information collectors.

class_identifier

string

No.

The identifier of the class which the object is an instance of (for example "consumer_product").

class_group_id_list

array

No.

An array of ID numbers of the class groups which the class (that the object is an instance of) belongs to.

name

string

No.

The actual name of the object in the current language (for example "Liver sandwich").

match_ingroup_id_list

array

No.

The ID numbers of the class groups that the class (which the object is an instance of) belongs to. This variable is connected with a feature that makes it possible to create template overrides based on class groups.

By default the "match_ingroup_id_list" always returns a boolean FALSE value because the class group override feature is turned off. It can be turned on by setting the "EnableClassGroupOverride" directive in the [ContentOverrideSettings] block of a configuration override for "content.ini" to "true".

current_language

string

No.

Not documented yet.

current_language_object

object

No.

Not documented yet.

initial_language

object

No.

The initial/main language as a ezcontentlanguage object.

initial_language_code

string

No.

The code of the initial/main language (for example "eng-GB").

available_languages

array

No.

The languages in which the last published version of the object exists (as an array of locale codes).

language_codes

array

No.

Not documented yet.

language_js_array

string

No.

Not documented yet.

languages

array

No.

The list of languages the object exists in, ordered by their priority (as an array of ezcontentlanguage objects).

can_edit_languages

array

No.

Not documented yet.

can_create_languages

array

No.

Not documented yet.

always_available

boolean

No.

Returns TRUE if the object is marked as "always available" (i.e. the object will be fetched even if it does not exist in any of the site languages), FALSE otherwise.

* Indicates whether the attribute provides a pre-fetched value or if it needs to be computed upon request.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.