Skip to the content
Documentation
Help Start
Reading in:
  • German: 9,059 of 9,059 pages
About the help in other languages
All help pages

Content object attributes reference

Every attribute a template can read from a content object (eZContentObject) - the 12 database fields and the 65 function attributes of its definition, the PHP method behind each, and the value each returned for a real…

Download as PDF

Address: https://doc.exponential.earth/learninminutes/exphelp/viewer/help/template-language/object-attributes-reference.md

On this page

Content object attributes reference

$node.object and $object (in content_view_gui templates and in the results of fetch( 'content', 'object' )) are eZContentObject objects (kernel/classes/ezcontentobject.php). The attributes a template can read are the fields (columns of the ezcontentobject table) and the function_attributes of eZContentObject::definition().

Contents

  1. How this table was made
  2. Database fields
  3. Function attributes
  4. A sample
  5. Notes
  6. Related pages

How this table was made

The same read-only script as for the node attributes: definition() listed, every name read with $object->attribute( $name ) on the object of node 96 (object 94, an ng_article), as the anonymous user of the site siteaccess.

Database fields

AttributeDatabase column / memberDatatypeValue on a development installation (node 96)
idIDintegerinteger 94
section_idSectionIDintegerinteger 1
owner_idOwnerIDintegerinteger 14
contentclass_idClassIDintegerinteger 44
nameNamestringstring "Why Should You Choose Strength Training?"
publishedPublishedintegerinteger 1532345053
modifiedModifiedintegerinteger 1600936234
current_versionCurrentVersionintegerinteger 1
statusStatusintegerinteger 1
remote_idRemoteIDstringstring "media-o-958"
language_maskLanguageMaskintegerinteger 2
initial_language_idInitialLanguageIDintegerinteger 2

Function attributes

name and remote_id are in both lists; the function attributes (name(), remoteID()) are the ones a template reads. name() returns the name in the object's current language, the field Name the name stored on the object.

Function attributePHP methodValue on a development installation (node 96)
currenteZContentObject::currentVersion()object eZContentObjectVersion
published_versioneZContentObject::publishedVersion()integer 1
versionseZContentObject::versions()array(1) of eZContentObjectVersion
author_arrayeZContentObject::authorArray()array(1) of eZUser
class_nameeZContentObject::className()string "NG Article"
content_classeZContentObject::contentClass()object eZContentClass
contentobject_attributeseZContentObject::contentObjectAttributes()array(18) of eZContentObjectAttribute
ownereZContentObject::owner()object eZContentObject
related_contentobject_arrayeZContentObject::relatedContentObjectList()array(0)
related_contentobject_counteZContentObject::relatedContentObjectCount()integer 0
reverse_related_contentobject_arrayeZContentObject::reverseRelatedObjectList()array(0)
reverse_related_contentobject_counteZContentObject::reverseRelatedObjectCount()integer 0
linked_contentobject_arrayeZContentObject::linkedContentObjectList()array(0)
linked_contentobject_counteZContentObject::linkedContentObjectCount()integer 0
reverse_linked_contentobject_arrayeZContentObject::reverseLinkedObjectList()array(0)
reverse_linked_contentobject_counteZContentObject::reverseLinkedObjectCount()integer 0
embedded_contentobject_arrayeZContentObject::embeddedContentObjectList()array(0)
embedded_contentobject_counteZContentObject::embeddedContentObjectCount()integer 0
reverse_embedded_contentobject_arrayeZContentObject::reverseEmbeddedObjectList()array(0)
reverse_embedded_contentobject_counteZContentObject::reverseEmbeddedObjectCount()integer 0
can_readeZContentObject::canRead()boolean true
can_pdfeZContentObject::canPdf()boolean true
can_diffeZContentObject::canDiff()boolean false
can_createeZContentObject::canCreate()boolean true
can_create_class_listeZContentObject::canCreateClassList()array(2) of array
can_editeZContentObject::canEdit()boolean false
can_translateeZContentObject::canTranslate()boolean false
can_removeeZContentObject::canRemove()boolean false
can_moveeZContentObject::canMoveFrom()boolean false
can_move_fromeZContentObject::canMoveFrom()boolean false
can_view_embedeZContentObject::canViewEmbed()boolean false
data_mapeZContentObject::dataMap()array(18) of eZContentObjectAttribute
grouped_data_mapeZContentObject::groupedDataMap()array(2) of array
main_parent_node_ideZContentObject::mainParentNodeID()integer 92
assigned_nodeseZContentObject::assignedNodes()array(1) of eZContentObjectTreeNode
visible_nodeseZContentObject::visibleNodes()array(1) of eZContentObjectTreeNode
has_visible_nodeeZContentObject::hasVisibleNode()boolean true
parent_nodeseZContentObject::parentNodeIDArray()array(1) of integer
main_node_ideZContentObject::mainNodeID()integer 96
main_nodeeZContentObject::mainNode()object eZContentObjectTreeNode
default_languageeZContentObject::defaultLanguage()string "eng-US"
content_action_listeZContentObject::contentActionList()array(0)
class_identifiereZContentObject::contentClassIdentifier()string "ng_article"
class_group_id_listeZContentObject::contentClassGroupIDList()array(1) of integer
nameeZContentObject::name()string "Why Should You Choose Strength Training?"
match_ingroup_id_listeZContentObject::matchIngroupIDList()boolean false
remote_ideZContentObject::remoteID()string "media-o-958"
current_languageeZContentObject::currentLanguage()string "eng-US"
current_language_objecteZContentObject::currentLanguageObject()object eZContentLanguage
initial_languageeZContentObject::initialLanguage()object eZContentLanguage
initial_language_codeeZContentObject::initialLanguageCode()string "eng-US"
available_languageseZContentObject::availableLanguages()array(1) of string
language_codeseZContentObject::availableLanguages()array(1) of string
language_js_arrayeZContentObject::availableLanguagesJsArray()string (49 bytes)
languageseZContentObject::languages()array(1) of eZContentLanguage
all_languageseZContentObject::allLanguages()array(1) of eZContentLanguage
can_edit_languageseZContentObject::canEditLanguages()array(0)
can_create_languageseZContentObject::canCreateLanguages()array(0)
always_availableeZContentObject::isAlwaysAvailable()integer 0
allowed_assign_section_listeZContentObject::allowedAssignSectionList()array(1) of array
allowed_assign_state_id_listeZContentObject::allowedAssignStateIDList()array(2) of integer
allowed_assign_state_listeZContentObject::allowedAssignStateList()array(1) of array
state_id_arrayeZContentObject::stateIDArray()array(2) of integer
state_identifier_arrayeZContentObject::stateIdentifierArray()array(2) of string
section_identifiereZContentObject::sectionIdentifier()string "standard"

A sample

{def $object = fetch( 'content', 'node', hash( 'node_id', 96 ) ).object}
id / class:          {$object.id} / {$object.class_identifier} ({$object.contentclass_id})
section:             {$object.section_id} ({$object.section_identifier})
published:           {$object.published|datetime( 'custom', '%Y-%m-%d' )}
current version:     {$object.current_version}
language:            {$object.current_language}, available: {$object.available_languages|implode( ', ' )}
states:              {$object.state_identifier_array|implode( ', ' )}
main node:           {$object.main_node_id}, locations: {$object.assigned_nodes|count}
related objects:     {$object.related_contentobject_count}, reverse related: {$object.reverse_related_contentobject_count}
owner is a user:     {cond( $object.owner.class_identifier|eq( 'user' ), 'yes', 'no' )}

Output:

id / class:          94 / ng_article (44)
section:             1 (standard)
published:           2018-07-23
current version:     1
language:            eng-US, available: eng-US
states:              ez_lock/not_locked, help_status/draft
main node:           96, locations: 1
related objects:     0, reverse related: 0
owner is a user:     yes

Notes

  • Relations. related_contentobject_array returns the objects this object relates to (all relation types: relatedContentObjectList() calls relatedObjects() without a type filter); linked_contentobject_array only the objects linked from rich text, embedded_contentobject_array only the ones embedded in it. The reverse_* variants return the objects that point at this one. Each reads the database when it is read.
  • Versions. current is the published version object, current_version its number, versions every version. Reading versions loads them all; use it in the admin, not on a site page.
  • Locations. main_node and main_node_id give the main location, assigned_nodes every location, visible_nodes the visible ones, parent_nodes the node IDs of the parents.
  • Grouped data map. grouped_data_map groups the attributes by their class attribute category (the "Category" of a class attribute, such as content and meta); the code notes that the result is not cached.
  • States. state_id_array maps each state group ID to the object's state ID, state_identifier_array gives group/state identifiers such as ez_lock/not_locked.
  • Permissions. can_edit, can_remove, can_translate, can_create_class_list and the other can_* attributes check the current user's policies, and can_create_languages / can_edit_languages the languages the user may use.
  • match_ingroup_id_list is false unless content.ini [ContentOverrideSettings] EnableClassGroupOverride=true; then it is the class group IDs, which the class_group override condition uses.
  • author_array returns eZUser objects of every user who created a version of the object.

Become an Exponential Partner

Partners share their information, provide funding, contribute back and develop the products with us, and that is how Exponential grows. A partner website and dashboard are planned for mid-2027: please become a partner today to speed up our growth rate and land new features faster.

Something wrong on this page? Report an error

Documentation license

This documentation is free documentation, licensed under the GNU Free Documentation License 1.3 or later.

Exponential Copyright © 1998-2026 Exponential Foundation and 7x