Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Private Attributes | List of all members
eZContentObject Class Reference
Inheritance diagram for eZContentObject:

## Public Member Functions
| __construct ( $row)
| eZContentObject ( $row)
| matchIngroupIDList ()
| store ( $fieldFilters=null)
| storeNodeModified ()
| name ( $version=false, $lang=false)
| names ()
| versionLanguageName ( $version, $lang=false)
| setCachedName ( $name)
| setName ( $objectName, $versionNum=false, $languageCode=false)
| dataMap ()
| groupedDataMap ()
| fetchDataMap ( $version=false, $language=false)
| resetDataMap ()
| fetchAttributesByIdentifier ( $identifierArray, $version=false, $languageArray=false, $asObject=true)
| owner ()
| contentClassGroupIDList ()
| contentClassIdentifier ()
| contentClass ()
| remoteID ()
| mainParentNodeID ()
| currentVersion ( $asObject=true)
| publishedVersion ()
| version ( $version, $asObject=true)
| versions ( $asObject=true, $parameters=array())
| hasRemainingVersions ()
| createInitialVersion ( $userID, $initialLanguageCode=false)
| createNewVersionIn ( $languageCode, $copyFromLanguageCode=false, $copyFromVersion=false, $versionCheck=true, $status=eZContentObjectVersion::STATUS_DRAFT)
| createNewVersion ( $copyFromVersion=false, $versionCheck=true, $languageCode=false, $copyFromLanguageCode=false, $status=eZContentObjectVersion::STATUS_DRAFT)
| copyVersion (&$newObject, &$version, $newVersionNumber, $contentObjectID=false, $status=eZContentObjectVersion::STATUS_DRAFT, $languageCode=false, $copyFromLanguageCode=false)
| __clone ()
| copy ( $allVersions=true)
| copyRevertTo ( $version, $language=false)
| purge ()
| removeThis ( $nodeID=null)
| cleanupInternalDrafts ( $userID=false, $timeDuration=86400)
| allContentObjectAttributes ( $contentObjectID, $asObject=true, $limit=null)
| contentObjectAttributes ( $asObject=true, $version=false, $language=false, $contentObjectAttributeID=false, $distinctItemsOnly=false)
| setContentObjectAttributes (&$attributes, $version, $language)
| resetInputRelationList ()
| appendInputRelationList ( $addingIDList, $relationType)
| commitInputRelations ( $editVersion)
| validateInput ( $contentObjectAttributes, $attributeDataBaseName, $inputParameters=false, $parameters=array())
| fixupInput ( $contentObjectAttributes, $attributeDataBaseName)
| fetchInput ( $contentObjectAttributes, $attributeDataBaseName, $customActionAttributeArray, $customActionParameters)
| handleCustomHTTPActions ( $contentObjectAttribute, $attributeDataBaseName, $customActionAttributeArray, $customActionParameters)
| handleAllCustomHTTPActions ( $attributeDataBaseName, $customActionAttributeArray, $customActionParameters, $objectVersion=false)
| storeInput ( $contentObjectAttributes, $attributeInputMap)
| nextVersion ()
| previousVersion ()
| getVersionCount ()
| currentLanguage ()
| currentLanguageObject ()
| setCurrentLanguage ( $lang)
| initialLanguage ()
| initialLanguageCode ()
| addLocation ( $parentNodeID, $asObject=false)
| addContentObjectRelation ( $toObjectID, $fromObjectVersion=false, $attributeID=0, $relationType=eZContentObject::RELATION_COMMON)
| removeContentObjectRelation ( $toObjectID=false, $fromObjectVersion=false, $attributeID=0, $relationType=eZContentObject::RELATION_COMMON)
| copyContentObjectRelations ( $currentVersion, $newVersion, $newObjectID=false)
| relatedObjects ( $fromObjectVersion=false, $objectID=false, $attributeID=0, $groupByAttribute=false, $params=false, $reverseRelatedObjects=false)
| relatedContentObjectList ( $fromObjectVersion=false, $fromObjectID=false, $attributeID=0, $groupByAttribute=false, $params=false)
| linkedContentObjectList ( $fromObjectVersion=false, $fromObjectID=false)
| embeddedContentObjectList ( $fromObjectVersion=false, $fromObjectID=false)
| reverseLinkedObjectList ( $fromObjectVersion=false, $fromObjectID=false)
| reverseEmbeddedObjectList ( $fromObjectVersion=false, $fromObjectID=false)
| relatedContentObjectArray ( $fromObjectVersion=false, $fromObjectID=false, $attributeID=0, $params=false)
| relatedContentObjectCount ( $fromObjectVersion=false, $attributeID=0, $params=false)
| reverseRelatedObjectList ( $version=false, $attributeID=0, $groupByAttribute=false, $params=false)
| linkedContentObjectCount ( $fromObjectVersion=false)
| embeddedContentObjectCount ( $fromObjectVersion=false)
| reverseLinkedObjectCount ( $fromObjectVersion=false)
| reverseEmbeddedObjectCount ( $fromObjectVersion=false)
| relatedObjectCount ( $version=false, $attributeID=0, $reverseRelatedObjects=false, $params=false)
| reverseRelatedObjectCount ( $version=false, $attributeID=0, $params=false)
| contentObjectListRelatingThis ( $version=false)
| parentNodeIDArray ()
| parentNodes ( $version=false, $asObject=true)
| createNodeAssignment ( $parentNodeID, $isMain, $remoteID=false, $sortField=eZContentObjectTreeNode::SORT_FIELD_PUBLISHED, $sortOrder=eZContentObjectTreeNode::SORT_ORDER_DESC)
| visibleNodes ()
| hasVisibleNode ()
| assignedNodes ( $asObject=true, $checkVisibility=false)
| mainNodeID ()
| mainNode ()
| setPermissions ( $permissionArray)
| permissions ()
| canEditLanguages ()
| canCreateLanguages ()
| checkGroupLimitationAccess ( $limitationValueList, $userID, $contentObjectID=false)
| checkAccess ( $functionName, $originalClassID=false, $parentClassID=false, $returnAccessList=false, $language=false)
| classListFromPolicy ( $policy, $allowedLanguageCodes=false)
| canCreateClassList ( $asObject=false, $includeFilter=true, $groupList=false, $fetchID=false)
| accessList ( $function)
| canRead ()
| canPdf ()
| canViewEmbed ()
| canDiff ()
| canCreate ()
| canEdit ( $originalClassID=false, $parentClassID=false, $returnAccessList=false, $language=false)
| canTranslate ()
| canRemove ()
| canMoveFrom ()
| className ()
| contentActionList ()
| hasContentAction ( $name)
| availableLanguages ()
| availableLanguagesJsArray ()
| languages ()
| allLanguages ()
| setClassName ( $name)
| fetchClassAttributes ( $version=0, $asObject=true)
| postUnserialize ( $package)
| serialize ( $package, $specificVersion=false, $options=false, $contentNodeIDArray=false, $topNodeIDArray=false)
| cacheInfo ( $Params)
| authorArray ()
| rename ( $newName)
| removeTranslation ( $languageID)
| isAlwaysAvailable ()
| setAlwaysAvailableLanguageID ( $languageID, $version=false)
| allowedAssignSectionList ()
| allowedAssignStateIDList (eZUser|null $user=null)
| allowedAssignStateList (eZUser|null $user=null)
| stateIDArray ( $refreshCache=false)
| stateIdentifierArray ()
| assignState (eZContentObjectState $state)
| assignDefaultStates ()
| restoreObjectAttributes ()
| sectionIdentifier ()
Public Member Functions inherited from eZPersistentObject
| eZPersistentObject ( $row=null)
| fill ( $row)
| remove ( $conditions=null, $extraConditions=null)
| sync ( $fieldFilters=null)
| attributes ()
| hasAttribute ( $attr)
| attribute ( $attr, $noFunction=false)
| setAttribute ( $attr, $val)
| hasDirtyData ()
| setHasDirtyData ( $hasDirtyData)

## Static Public Member Functions
static | definition ()
static | clearCache ( $idArray=array())
static | createGroupedDataMap ( $contentObjectAttributes)
static | fetchByRemoteID ( $remoteID, $asObject=true)
static | fetch ( $id, $asObject=true)
static | fetchForUpdate ( $id, $asObject=true)
static | exists ( $id)
static | createFetchSQLString ( $id)
static | createFilterByVisibilitySQLString ( $IgnoreVisibility=false, $ezcontentobjectTable='ezcontentobject')
static | fetchByNodeID ( $nodeID, $asObject=true)
static | fetchIDArray ( $idArray, $asObject=true, $lang=false)
static | fetchList ( $asObject=true, $conditions=null, $offset=false, $limit=false)
static | fetchFilteredList ( $conditions=null, $offset=false, $limit=false, $asObject=true)
static | fetchListCount ( $conditions=null)
static | fetchSameClassList ( $contentClassID, $asObject=true, $offset=false, $limit=false)
static | fetchSameClassListCount ( $contentClassID)
static | create ( $name, $contentclassID, $userID, $sectionID=1, $version=1, $languageCode=false)
static | fixReverseRelations ( $objectID, $mode=false, $clearCacheIfEnabled=true)
static | cleanupAllInternalDrafts ( $userID=false, $timeDuration=86400)
static | fillNodeListAttributes ( $objList, $asObject=true)
static | recursionProtectionStart ()
static | recursionProtect ( $id)
static | recursionProtectionEnd ()
static | isObjectRelationTyped ()
static | relationTypeMask ( $allRelations=false)
static | createWithNodeAssignment ( $parentNode, $contentClassID, $languageCode, $remoteID=false)
static | defaultLanguage ()
static | setDefaultLanguage ( $lang)
static | translationStringList ()
static | translationList ()
static | mapLanguage ( $language, $options)
static | expireAllViewCache ()
static | expireAllCache ()
static | expireTemplateBlockCache ()
static | expireComplexViewModeCache ()
static | isCacheExpired ( $timestamp)
static | isComplexViewMode ( $viewMode)
static | isComplexViewModeCacheExpired ( $viewMode, $timestamp)
static | fetchObjectCountByUserID ( $classID, $userID, $status=false)
static | removeVersions ( $versionStatus=false)
Static Public Member Functions inherited from eZPersistentObject
static | replaceFieldsWithShortNames (eZDBInterface $db, array $fieldDefs, &$fields)
static | count ( $def, $conds=null, $field=null)
static | fetchObject ( $def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
static | removeObject ( $def, $conditions=null, $extraConditions=null)
static | storeObject ( $obj, $fieldFilters=null)
static | conditionText ( $conditions)
static | conditionTextByRow ( $conditions, $row)
static | fetchObjectList ( $def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null, $custom_tables=null, $custom_conds=null)
static | handleRows ( $rows, $class_name, $asObject)
static | swapRow ( $table, $keys, $order_id, $rows, $id1, $id2)
static | newObjectOrder ( $def, $orderField, $conditions)
static | reorderObject ( $def, $orderField, $conditions, $down=true)
static | escapeArray ( $array)
static | updateObjectList ( $parameters)
static | getShortAttributeName ( $db, $def, $attrName)

## Public Attributes
| $ContentObjectAttributeArray
const | STATUS_DRAFT = 0
const | STATUS_PUBLISHED = 1
const | STATUS_ARCHIVED = 2
const | PACKAGE_ERROR_NO_CLASS = 1
const | PACKAGE_ERROR_EXISTS = 2
const | PACKAGE_ERROR_NODE_EXISTS = 3
const | PACKAGE_ERROR_MODIFIED = 101
const | PACKAGE_ERROR_HAS_CHILDREN = 102
const | PACKAGE_REPLACE = 1
const | PACKAGE_SKIP = 2
const | PACKAGE_NEW = 3
const | PACKAGE_UPDATE = 6
const | PACKAGE_DELETE = 4
const | PACKAGE_KEEP = 5
const | RELATION_COMMON = 1
const | RELATION_EMBED = 2
const | RELATION_LINK = 4
const | RELATION_ATTRIBUTE = 8
| $ID
| $Name
| $CurrentLanguage
| $ClassName
| $ClassIdentifier
| $DataMap = array()
| $ContentActionList = false
| $ContentObjectAttributes = array()
| $MainNodeID = false
| $InputRelationList = array()
| $Permissions
| $ContentObject
Public Attributes inherited from eZPersistentObject
| $PersistentDataDirty
| $ID
| $ContentObjectID
| $SectionID
| $OwnerID
| $ClassID
| $Published
| $Modified
| $CurrentVersion
| $Status
| $RemoteID
| $LanguageMask
| $InitialLanguageID
| $NodeID
| $ParentNodeID
| $MainNodeID
| $ContentObjectVersion
| $ContentObjectIsPublished
| $Depth
| $SortField
| $SortOrder
| $Priority
| $ModifiedSubNode
| $PathString
| $PathIdentificationString
| $IsHidden
| $IsInvisible
| $UserID
| $Name
| $Locale
| $Identifier
| $NavigationPartIdentifier
| $SerializedDescriptionList
| $URLAliasName
| $AlwaysAvailable
| $CanTranslate
| $DataInt1
| $DataInt2
| $DataInt3
| $DataInt4
| $DataFloat1
| $DataFloat2
| $DataFloat3
| $DataFloat4
| $DataText1
| $DataText2
| $DataText3
| $DataText4
| $DataText5
| $SerializedDataText
| $Category
| $PolicyID
| $Values
| $Created
| $CurrencyCode
| $ProductCollectionID
| $ItemCount
| $Price
| $IsVATIncluded
| $VATValue
| $DiscountValue
| $Email
| $IsTemporary
| $IsArchived
| $IsActive
| $OrderID
| $ModifierID
| $Code
| $Symbol
| $AutoRateValue
| $CustomRateValue
| $RateFactor
| $Main
| $MementoKey
| $MainKey
| $WorkflowEventPos
| $LanguageID
| $ContentObjectStateGroupID
| $contentobject_attribute_id
| $contentobject_id
| $rating
| $rating_count
| $rating_average

## Private Attributes
| $StateIDArray = false

## Additional Inherited Members
Static Protected Member Functions inherited from eZPersistentObject
static | replaceFieldsWithLongNames (eZDBInterface $db, array $fieldDefs, &$fields)

## Detailed Description

Definition at line 16 of file ezcontentobject.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZContentObject::__construct | ( |  | $row | ) |

Initializes the object with $row.

If $row is an integer, it will try to fetch it from the database using it as the unique ID.

Parameters

  int | array | $row |

Reimplemented from eZPersistentObject.

Definition at line 49 of file ezcontentobject.php.

References eZContentClass\nameFromSerializedString(), and eZContentLanguage\topPriorityLanguageByMask().

Referenced by eZContentObject().

## Member Function Documentation

## ◆ __clone()

eZContentObject::__clone | ( |  | ) |

Resets certain attributes of the content object on clone and resets the data map

Definition at line 1697 of file ezcontentobject.php.

References resetDataMap(), and eZPersistentObject\setAttribute().

## ◆ accessList()

eZContentObject::accessList | ( |  | $function | ) |

Get accesslist for specified function

Parameters

  string | $function |

Returns
  array|int

Definition at line 5009 of file ezcontentobject.php.

References checkAccess().

## ◆ addContentObjectRelation()

eZContentObject::addContentObjectRelation | ( |  | $toObjectID,
|  |  | $fromObjectVersion = `false`,
|  |  | $attributeID = `0`,
|  |  | $relationType = `eZContentObject::RELATION_COMMON`
| ) |  |

Adds a link to the given content object id.

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  int | $toObjectID |
  int | bool | $fromObjectVersion |
  int | $attributeID |
  int | $relationType |

Returns
  bool|void

Definition at line 2905 of file ezcontentobject.php.

References eZPersistentObject\$CurrentVersion, $ID, exists(), eZDB\instance(), RELATION_ATTRIBUTE, RELATION_COMMON, RELATION_EMBED, RELATION_LINK, eZDebug\writeError(), and eZDebug\writeWarning().

Referenced by commitInputRelations().

## ◆ addLocation()

eZContentObject::addLocation | ( |  | $parentNodeID,
|  |  | $asObject = `false`
| ) |  |

Adds a new location (node) to the current object.

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  int | $parentNodeID | The id of the node to use as parent.
  bool | $asObject | If true it will return the new child-node as an object, if not it returns the ID.

Returns
  eZContentObjectTreeNode|int

Definition at line 2868 of file ezcontentobject.php.

References eZContentObjectTreeNode\addChildTo(), eZPersistentObject\attribute(), eZNodeAssignment\create(), and eZNodeAssignment\OP_CODE_CREATE_NOP.

## ◆ allContentObjectAttributes()

eZContentObject::allContentObjectAttributes | ( |  | $contentObjectID,
|  |  | $asObject = `true`,
|  |  | $limit = `null`
| ) |  |

Fetches all attributes from any versions of the content object

Parameters

  int | $contentObjectID |
  bool | $asObject |
  array | null | $limit | the limit array passed to {

See also
  eZPersistentObject::fetchObjectList}

Returns
  eZContentObjectAttribute[]|array|null

Definition at line 2166 of file ezcontentobject.php.

References eZContentObjectAttribute\definition(), and eZPersistentObject\fetchObjectList().

Referenced by purge(), and restoreObjectAttributes().

## ◆ allLanguages()

eZContentObject::allLanguages | ( |  | ) |

Returns
  eZContentLanguage[]|array

Definition at line 5321 of file ezcontentobject.php.

References eZContentLanguage\languagesByMask().

## ◆ allowedAssignSectionList()

eZContentObject::allowedAssignSectionList | ( |  | ) |

Returns
  eZSection[]|null

Definition at line 6372 of file ezcontentobject.php.

References eZPersistentObject\attribute(), eZUser\currentUser(), eZSection\fetchFilteredList(), and eZSection\fetchList().

## ◆ allowedAssignStateIDList()

eZContentObject::allowedAssignStateIDList | ( | eZUser|null | $user = `null` | ) |

Gets a list of states a user is allowed to put the content object in.

Returns
  array the IDs of all states we are allowed to set

Parameters

  eZUser | $user | the user to check the policies of, when omitted the currently logged in user will be used

Definition at line 6396 of file ezcontentobject.php.

References eZPersistentObject\attribute(), checkGroupLimitationAccess(), eZPersistentObject\count(), eZUser\currentUser(), and eZDB\instance().

Referenced by allowedAssignStateList().

## ◆ allowedAssignStateList()

eZContentObject::allowedAssignStateList | ( | eZUser|null | $user = `null` | ) |

Parameters

  eZUser | null | $user |

Returns
  array

Definition at line 6513 of file ezcontentobject.php.

References allowedAssignStateIDList(), and eZPersistentObject\attribute().

## ◆ appendInputRelationList()

eZContentObject::appendInputRelationList | ( |  | $addingIDList,
|  |  | $relationType
| ) |  |

Parameters

  int[] | $addingIDList |
  int | $relationType |

Definition at line 2377 of file ezcontentobject.php.

References eZPersistentObject\count(), and resetInputRelationList().

## ◆ assignDefaultStates()

eZContentObject::assignDefaultStates | ( |  | ) |

Sets the default states of a content object.

This function is called upon instantiating a content object with eZContentClass::instantiate(), so should normally not be called by any other code.

Definition at line 6651 of file ezcontentobject.php.

References $ID, and eZDB\instance().

## ◆ assignedNodes()

eZContentObject::assignedNodes | ( |  | $asObject = `true`,
|  |  | $checkVisibility = `false`
| ) |  |

Returns the node assignments for the current object.

Parameters

  boolean | $asObject |
  boolean | $checkVisibility | if true, the visibility and the setting site.ini/[SiteAccessSettings]/ShowHiddenNodes are taken into account.

Returns
  eZContentObjectTreeNode[]|array[]

Definition at line 3922 of file ezcontentobject.php.

References eZPersistentObject\attribute(), eZDB\instance(), and eZContentObjectTreeNode\makeObjectsArray().

Referenced by copy(), createNewVersion(), removeTranslation(), storeNodeModified(), and visibleNodes().

## ◆ assignState()

eZContentObject::assignState | ( | eZContentObjectState | $state | ) |

Sets the state of a content object.

Changes are stored immediately in the database, does not require a store() of the content object. Should only be called on instances of eZContentObject that have a ID (that were stored already before).

Parameters

  eZContentObjectState | $state |

Returns
  boolean true when the state was set, false if the state equals the current state

Definition at line 6620 of file ezcontentobject.php.

References $ID, eZDB\instance(), and stateIDArray().

## ◆ authorArray()

eZContentObject::authorArray | ( |  | ) |

Returns a list of all the authors for this object

Returns
  eZUser[]

Definition at line 6037 of file ezcontentobject.php.

References eZDB\instance().

## ◆ availableLanguages()

eZContentObject::availableLanguages | ( |  | ) |

Returns the languages the object has been translated into/exists in.

Returns
  array An array with the language codes.

Definition at line 5285 of file ezcontentobject.php.

References languages().

Referenced by canCreateLanguages(), canEditLanguages(), and copyVersion().

## ◆ availableLanguagesJsArray()

eZContentObject::availableLanguagesJsArray | ( |  | ) |

Returns the languages the object has been translated into/exists in as a JSON string

Returns
  bool|string

Definition at line 5303 of file ezcontentobject.php.

References eZContentLanguage\jsArrayByMask().

## ◆ cacheInfo()

eZContentObject::cacheInfo | ( |  | $Params | ) |

Returns a structure with information required for caching.

Parameters

  $Params | array

Returns
  array

Definition at line 5909 of file ezcontentobject.php.

References eZUser\currentUser(), and eZUserDiscountRule\fetchIDListByUserID().

## ◆ canCreate()

eZContentObject::canCreate | ( |  | ) |

Returns true if the current user can create a content object like this one.

Returns
  bool

Definition at line 5087 of file ezcontentobject.php.

References checkAccess().

## ◆ canCreateClassList()

eZContentObject::canCreateClassList | ( |  | $asObject = `false`,
|  |  | $includeFilter = `true`,
|  |  | $groupList = `false`,
|  |  | $fetchID = `false`
| ) |  |

Finds all classes that the current user can create objects from and returns. It is also possible to filter the list event more with $includeFilter and $groupList.

Parameters

  bool | $asObject | If true then it return eZContentClass objects, if not it will be an associative array
  bool | $includeFilter | If true then it will include only from class groups defined in $groupList, if not it will exclude those groups.
  bool | $groupList | An array with class group IDs that should be used in filtering, use false if you do not wish to filter at all.
  bool | $fetchID | A unique name for the current fetch, this must be supplied when filtering is used if you want caching to work.

Returns
  array|eZPersistentObject[]

Definition at line 4868 of file ezcontentobject.php.

References classListFromPolicy(), eZPersistentObject\count(), eZUser\currentUser(), eZContentLanguage\fetchLocaleList(), eZPersistentObject\handleRows(), eZDB\instance(), eZContentClassName\sqlFilter(), eZContentClass\VERSION_STATUS_DEFINED, and eZDebugSetting\writeDebug().

## ◆ canCreateLanguages()

eZContentObject::canCreateLanguages | ( |  | ) |

Returns a list of languages of the current object that the current user can create

Returns
  eZContentLanguage[]

Definition at line 4035 of file ezcontentobject.php.

References availableLanguages(), checkAccess(), and eZContentLanguage\prioritizedLanguages().

## ◆ canDiff()

eZContentObject::canDiff | ( |  | ) |

Returns true if the current user can diff this content object.

Returns
  bool

Definition at line 5073 of file ezcontentobject.php.

References checkAccess().

## ◆ canEdit()

eZContentObject::canEdit | ( |  | $originalClassID = `false`,
|  |  | $parentClassID = `false`,
|  |  | $returnAccessList = `false`,
|  |  | $language = `false`
| ) |  |

Returns true if the current user can edit this content object.

Parameters

  int | bool | $originalClassID |
  int | bool | $parentClassID |
  bool | $returnAccessList |
  string | bool | $language |

Returns
  bool

Definition at line 5105 of file ezcontentobject.php.

References checkAccess(), and eZUser\currentUser().

Referenced by canEditLanguages().

## ◆ canEditLanguages()

eZContentObject::canEditLanguages | ( |  | ) |

Returns a list of languages of the current object that the current user can edit

Returns
  eZContentLanguage[]

Definition at line 4012 of file ezcontentobject.php.

References availableLanguages(), canEdit(), and eZContentLanguage\prioritizedLanguages().

## ◆ canMoveFrom()

eZContentObject::canMoveFrom | ( |  | ) |

Returns true if the current user can move this content object.

Returns
  bool

Definition at line 5182 of file ezcontentobject.php.

References checkAccess().

## ◆ canPdf()

eZContentObject::canPdf | ( |  | ) |

Returns true if the current user can create a pdf of this content object.

Returns
  bool

Definition at line 5045 of file ezcontentobject.php.

References checkAccess().

## ◆ canRead()

eZContentObject::canRead | ( |  | ) |

Returns true if the current user can read this content object.

Returns
  bool

Definition at line 5031 of file ezcontentobject.php.

References checkAccess().

## ◆ canRemove()

eZContentObject::canRemove | ( |  | ) |

Returns true if the current user can remove this content object.

Returns
  bool

Definition at line 5167 of file ezcontentobject.php.

References checkAccess().

## ◆ canTranslate()

eZContentObject::canTranslate | ( |  | ) |

Returns true if the current user can translate this content object.

Returns
  bool

Definition at line 5141 of file ezcontentobject.php.

References checkAccess(), and eZUser\currentUser().

## ◆ canViewEmbed()

eZContentObject::canViewEmbed | ( |  | ) |

Returns true if the node can be viewed as embeded object by the current user.

Returns
  bool

Definition at line 5059 of file ezcontentobject.php.

References checkAccess().

## ◆ checkAccess()

eZContentObject::checkAccess | ( |  | $functionName,
|  |  | $originalClassID = `false`,
|  |  | $parentClassID = `false`,
|  |  | $returnAccessList = `false`,
|  |  | $language = `false`
| ) |  |

Check access for the current object

Parameters

  string | $functionName | Function name ( edit, read, remove, etc. )
  int | bool | $originalClassID | Used to check access for object creation
  int | bool | $parentClassID | Used to check access for object creation
  bool | $returnAccessList | If true, returns access list instead of access result
  string | bool | $language |

Returns
  array|int 1 if has access, 0 if not, array if $returnAccessList is true

Definition at line 4115 of file ezcontentobject.php.

References eZPersistentObject\attribute(), checkGroupLimitationAccess(), eZPersistentObject\count(), eZUser\currentUser(), eZContentObjectTreeNode\fetch(), eZNodeAssignment\fetchForObject(), eZContentLanguage\idByLocale(), eZContentLanguage\maskByLocale(), eZPreferences\value(), and eZDebug\writeError().

Referenced by accessList(), canCreate(), canCreateLanguages(), canDiff(), canEdit(), canMoveFrom(), canPdf(), canRead(), canRemove(), canTranslate(), canViewEmbed(), and removeTranslation().

## ◆ checkGroupLimitationAccess()

eZContentObject::checkGroupLimitationAccess | ( |  | $limitationValueList,
|  |  | $userID,
|  |  | $contentObjectID = `false`
| ) |  |

Parameters

  array | $limitationValueList |
  int | $userID |
  int | bool | $contentObjectID |

Returns
  string Returns "denied" or "allowed"

Definition at line 4058 of file ezcontentobject.php.

References eZPersistentObject\count(), fetch(), and eZContentObjectTreeNode\getParentNodeIdListByContentObjectID().

Referenced by allowedAssignStateIDList(), checkAccess(), and classListFromPolicy().

## ◆ classListFromPolicy()

eZContentObject::classListFromPolicy | ( |  | $policy,
|  |  | $allowedLanguageCodes = `false`
| ) |  |

Returns an array of classes the current user has access to

Parameters

  array | $policy |
  array | bool | $allowedLanguageCodes |

Returns
  array

Definition at line 4693 of file ezcontentobject.php.

References eZPersistentObject\attribute(), checkGroupLimitationAccess(), eZUser\currentUser(), eZContentObjectTreeNode\fetch(), and eZPreferences\value().

Referenced by canCreateClassList().

## ◆ className()

eZContentObject::className | ( |  | ) |

Returns the name of the class which this object was created from.

The object will cache the class name information so multiple calls will be fast.

Returns
  string|bool|null

Definition at line 5199 of file ezcontentobject.php.

References $ClassName, eZPersistentObject\count(), eZDB\instance(), and eZContentClass\nameFromSerializedString().

## ◆ cleanupAllInternalDrafts()

static eZContentObject::cleanupAllInternalDrafts | ( |  | $userID = `false`,
|  |  | $timeDuration = `86400`
| ) |  |
| static

Removes all old internal drafts by the specified user for the past time span given by $timeDuration

Parameters

  int | bool | $userID | The ID of the user to cleanup for, if false it will use the current user.
  int | $timeDuration | default time duration for internal drafts 60*60*24 seconds (1 day)

Definition at line 2131 of file ezcontentobject.php.

References eZUser\currentUserID(), eZContentObjectVersion\fetchForUser(), eZContentObjectVersion\STATUS_INTERNAL_DRAFT, and eZDebug\writeError().

## ◆ cleanupInternalDrafts()

eZContentObject::cleanupInternalDrafts | ( |  | $userID = `false`,
|  |  | $timeDuration = `86400`
| ) |  |

Removes old internal drafts by the specified user associated for the past time span given by $timeDuration

Parameters

  int | bool | $userID | The ID of the user to cleanup for, if false it will use the current user.
  int | $timeDuration | default time duration for internal drafts 60*60*24 seconds (1 day)

Definition at line 2098 of file ezcontentobject.php.

References eZUser\currentUserID(), eZContentObjectVersion\STATUS_INTERNAL_DRAFT, versions(), and eZDebug\writeError().

## ◆ clearCache()

static eZContentObject::clearCache | ( |  | $idArray = `array()` | ) |
| static

Clear in-memory caches.

If $idArray is ommitted, the caches are cleared for all objects.

Parameters

  array | $idArray | Objects to clear caches for.

Definition at line 284 of file ezcontentobject.php.

References eZPersistentObject\count().

Referenced by eZContentObjectTreeNode\assignSectionToSubTree(), eZContentClassAttribute\initializeObjectAttributes(), eZContentObjectPackageHandler\installContentObjects(), eZNotificationEventFilter\process(), eZCache\purgeImageAlias(), eZContentObjectTreeNode\removeSubtrees(), eZContentObjectVersion\store(), and eZContentObjectPackageHandler\uninstall().

## ◆ commitInputRelations()

eZContentObject::commitInputRelations | ( |  | $editVersion | ) |

Parameters

  int | bool | $editVersion |

Returns
  bool

Definition at line 2406 of file ezcontentobject.php.

References addContentObjectRelation(), relatedObjects(), and removeContentObjectRelation().

Referenced by validateInput().

## ◆ contentActionList()

eZContentObject::contentActionList | ( |  | ) |

Returns an array of the content actions which can be performed on the current object.

Returns
  array|bool

Definition at line 5225 of file ezcontentobject.php.

References $ContentActionList, eZPersistentObject\attribute(), contentObjectAttributes(), hasContentAction(), and initialLanguageCode().

## ◆ contentClass()

eZContentObject::contentClass | ( |  | ) |

Returns the content class for the current content object

Returns
  eZContentClass|null

Definition at line 816 of file ezcontentobject.php.

References eZContentClass\fetch().

Referenced by contentClassGroupIDList(), copyVersion(), matchIngroupIDList(), and rename().

## ◆ contentClassGroupIDList()

eZContentObject::contentClassGroupIDList | ( |  | ) |

Returns the content class group identifiers for the current content object

Returns
  array

Definition at line 782 of file ezcontentobject.php.

References contentClass().

## ◆ contentClassIdentifier()

eZContentObject::contentClassIdentifier | ( |  | ) |

Returns the content class identifer for the current content object

The object will cache the class name information so multiple calls will be fast.

Returns
  string|bool|null

Definition at line 795 of file ezcontentobject.php.

References $ClassIdentifier, and eZContentClass\classIdentifierByID().

## ◆ contentObjectAttributes()

eZContentObject::contentObjectAttributes | ( |  | $asObject = `true`,
|  |  | $version = `false`,
|  |  | $language = `false`,
|  |  | $contentObjectAttributeID = `false`,
|  |  | $distinctItemsOnly = `false`
| ) |  |

Fetches the attributes for the current published version of the object.

Todo:

  fix using of $asObject parameter

  fix condition for getting attribute from cache

  probably need to move method to eZContentObjectVersion class

Parameters

  bool | $asObject |
  int | bool | $version |
  string | bool | $language |
  int | bool | $contentObjectAttributeID |
  bool | $distinctItemsOnly |

Returns
  eZContentObjectAttribute[]|array

Definition at line 2190 of file ezcontentobject.php.

References $CurrentLanguage, eZPersistentObject\$CurrentVersion, and eZDB\instance().

Referenced by contentActionList(), fetchDataMap(), and handleAllCustomHTTPActions().

## ◆ contentObjectListRelatingThis()

eZContentObject::contentObjectListRelatingThis | ( |  | $version = `false` | ) |

Returns the related objects.

See also
  reverseRelatedObjectList()

Deprecated:
  This function is a duplicate of reverseRelatedObjectList(), use that function instead.

Parameters

  int | bool | $version |

Returns
  array|eZContentObject[]

Definition at line 3741 of file ezcontentobject.php.

References reverseRelatedObjectList().

## ◆ copy()

eZContentObject::copy | ( |  | $allVersions = `true` | ) |

Makes a copy of the object which is stored and then returns it.

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  bool | $allVersions | If true, all versions are copied. If false, only the latest version is copied

Returns
  eZContentObject

Definition at line 1714 of file ezcontentobject.php.

References assignedNodes(), eZPersistentObject\attribute(), copyVersion(), eZUser\currentUser(), currentVersion(), eZRemoteIdUtility\generate(), eZDB\instance(), STATUS_DRAFT, versions(), and eZDebugSetting\writeDebug().

## ◆ copyContentObjectRelations()

eZContentObject::copyContentObjectRelations | ( |  | $currentVersion,
|  |  | $newVersion,
|  |  | $newObjectID = `false`
| ) |  |

Parameters

  int | $currentVersion |
  int | $newVersion |
  int | bool | $newObjectID |

Definition at line 3074 of file ezcontentobject.php.

References $ID, and eZDB\instance().

Referenced by copyVersion().

## ◆ copyRevertTo()

eZContentObject::copyRevertTo | ( |  | $version,
|  |  | $language = `false`
| ) |  |

Copies the given version of the object and creates a new current version.

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  int | $version |
  string | bool | $language |

Returns
  int The new version number

Definition at line 1827 of file ezcontentobject.php.

References createNewVersionIn().

## ◆ copyVersion()

eZContentObject::copyVersion | ( | & | $newObject,
|  | & | $version,
|  |  | $newVersionNumber,
|  |  | $contentObjectID = `false`,
|  |  | $status = `eZContentObjectVersion::STATUS_DRAFT`,
|  |  | $languageCode = `false`,
|  |  | $copyFromLanguageCode = `false`
| ) |  |

Creates a new version and returns it as an eZContentObjectVersion object.

If version number is given as argument that version is used to create a copy.

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  eZContentObject | $newObject |
  eZContentObjectVersion | $version |
  int | $newVersionNumber |
  int | bool | $contentObjectID |
  int | $status |
  string | bool | $languageCode | If false all languages will be copied, otherwise only specified by the locale code string or an array of the locale code strings.
  string | bool | $copyFromLanguageCode |

Returns
  eZContentObjectVersion

Definition at line 1538 of file ezcontentobject.php.

References eZPersistentObject\attribute(), availableLanguages(), contentClass(), copyContentObjectRelations(), eZUser\currentUser(), eZContentObjectAttribute\fetchByClassAttributeID(), eZContentLanguage\idByLocale(), eZDB\instance(), isAlwaysAvailable(), eZNodeAssignment\OP_CODE_SET, eZContentObjectVersion\STATUS_DRAFT, eZContentObjectVersion\STATUS_PUBLISHED, and eZDebugSetting\writeDebug().

Referenced by copy(), and createNewVersion().

## ◆ create()

static eZContentObject::create | ( |  | $name,
|  |  | $contentclassID,
|  |  | $userID,
|  |  | $sectionID = `1`,
|  |  | $version = `1`,
|  |  | $languageCode = `false`
| ) |  |
| static

Creates a new content object instance and stores it.

Parameters

  string | $name |
  int | $contentclassID |
  int | $userID |
  int | $sectionID |
  int | $version |
  string | bool | $languageCode |

Returns
  eZContentObject

Definition at line 1669 of file ezcontentobject.php.

References defaultLanguage(), eZContentObject(), eZRemoteIdUtility\generate(), and eZContentLanguage\idByLocale().

Referenced by eZContentClass\instantiate().

## ◆ createFetchSQLString()

static eZContentObject::createFetchSQLString | ( |  | $id | ) |
| static

Creates the SQL for fetching the object with ID $id and returns the string.

Parameters

  int | $id |

Returns
  string

Definition at line 1027 of file ezcontentobject.php.

Referenced by exists(), and fetch().

## ◆ createFilterByVisibilitySQLString()

static eZContentObject::createFilterByVisibilitySQLString | ( |  | $IgnoreVisibility = `false`,
|  |  | $ezcontentobjectTable = `'ezcontentobject'`
| ) |  |
| static

Creates the SQL for filtering objects by visibility, used by IgnoreVisibility on some fetches. The object is visible if 1 or more assigned nodes are visible.

Since
  Version 4.1

Parameters

  bool | $IgnoreVisibility | ignores visibility if true
  string | $ezcontentobjectTable | name of ezcontentobject table used in sql

Returns
  string with sql condition for node filtering by visibility

Definition at line 1055 of file ezcontentobject.php.

Referenced by relatedObjectCount(), and relatedObjects().

## ◆ createGroupedDataMap()

static eZContentObject::createGroupedDataMap | ( |  | $contentObjectAttributes | ) |
| static

Generates a map with all the content object attributes where the keys are the attribute identifiers grouped by class attribute category.

Result is not cached, so make sure you don't call this over and over.

Parameters

  eZContentObjectAttribute[] | $contentObjectAttributes | Array of eZContentObjectAttribute objects

Returns
  array

Definition at line 579 of file ezcontentobject.php.

Referenced by groupedDataMap().

## ◆ createInitialVersion()

eZContentObject::createInitialVersion | ( |  | $userID,
|  |  | $initialLanguageCode = `false`
| ) |  |

Creates an initial content object version

Parameters

  int | $userID |
  string | bool | $initialLanguageCode |

Returns
  eZContentObjectVersion

Definition at line 1392 of file ezcontentobject.php.

References eZPersistentObject\attribute(), and eZContentObjectVersion\create().

## ◆ createNewVersion()

eZContentObject::createNewVersion | ( |  | $copyFromVersion = `false`,
|  |  | $versionCheck = `true`,
|  |  | $languageCode = `false`,
|  |  | $copyFromLanguageCode = `false`,
|  |  | $status = `eZContentObjectVersion::STATUS_DRAFT`
| ) |  |

Creates a new version and returns it as an eZContentObjectVersion object.

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  int | bool | $copyFromVersion | If given, that version is used to create a copy.
  bool | $versionCheck | If `true` it will check if there are too many version and remove some of them to make room for a new.
  string | bool | $languageCode |
  string | bool | $copyFromLanguageCode |
  int | $status |

Returns
  eZContentObjectVersion

Definition at line 1427 of file ezcontentobject.php.

References assignedNodes(), eZPersistentObject\attribute(), copyVersion(), eZPersistentObject\count(), currentVersion(), getVersionCount(), initialLanguage(), eZDB\instance(), nextVersion(), eZContentObjectVersion\STATUS_ARCHIVED, version(), eZContentClass\versionHistoryLimit(), and versions().

Referenced by createNewVersionIn(), rename(), and eZContentFunctions\updateAndPublishObject().

## ◆ createNewVersionIn()

eZContentObject::createNewVersionIn | ( |  | $languageCode,
|  |  | $copyFromLanguageCode = `false`,
|  |  | $copyFromVersion = `false`,
|  |  | $versionCheck = `true`,
|  |  | $status = `eZContentObjectVersion::STATUS_DRAFT`
| ) |  |

Creates a new version for the language $languageCode

Parameters

  string | $languageCode |
  bool | $copyFromLanguageCode |
  int | bool | $copyFromVersion |
  bool | $versionCheck |
  int | $status |

Returns
  eZContentObjectVersion

Definition at line 1408 of file ezcontentobject.php.

References createNewVersion().

Referenced by copyRevertTo().

## ◆ createNodeAssignment()

eZContentObject::createNodeAssignment | ( |  | $parentNodeID,
|  |  | $isMain,
|  |  | $remoteID = `false`,
|  |  | $sortField = `eZContentObjectTreeNode::SORT_FIELD_PUBLISHED`,
|  |  | $sortOrder = `eZContentObjectTreeNode::SORT_ORDER_DESC`
| ) |  |

Creates and returns a new node assignment that will place the object as child of node $nodeID.

The returned assignment will already be stored in the database

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  int | $parentNodeID | The node ID of the parent node
  bool | $isMain | True if the created node is the main node of the object
  string | bool | $remoteID | A string denoting the unique remote ID of the assignment or `false` for no remote id.
  int | $sortField |
  int | $sortOrder |

Returns
  eZNodeAssignment|null

Definition at line 3805 of file ezcontentobject.php.

References eZPersistentObject\attribute(), and eZNodeAssignment\create().

## ◆ createWithNodeAssignment()

static eZContentObject::createWithNodeAssignment | ( |  | $parentNode,
|  |  | $contentClassID,
|  |  | $languageCode,
|  |  | $remoteID = `false`
| ) |  |
| static

Creates object with nodeAssignment from given parent Node, class ID and language code.

Parameters

  eZContentObjectTreeNode | $parentNode |
  int | $contentClassID |
  string | $languageCode |
  string | bool | $remoteID |

Returns
  eZContentObject|null

Definition at line 3831 of file ezcontentobject.php.

References eZContentClass\fetch(), eZDB\instance(), and eZContentObjectVersion\STATUS_INTERNAL_DRAFT.

## ◆ currentLanguage()

eZContentObject::currentLanguage | ( |  | ) |

Returns the current object's language

Returns
  bool|string

Definition at line 2800 of file ezcontentobject.php.

References $CurrentLanguage.

## ◆ currentLanguageObject()

eZContentObject::currentLanguageObject | ( |  | ) |

Returns the language object of the current object's language

Returns
  eZContentLanguage|bool|

Definition at line 2810 of file ezcontentobject.php.

References eZContentLanguage\fetchByLocale().

## ◆ currentVersion()

eZContentObject::currentVersion | ( |  | $asObject = `true` | ) |

Returns the current version of this document.

Parameters

  bool | $asObject | If true, returns an eZContentObjectVersion; if false, returns an array

Returns
  eZContentObjectVersion|array|bool

Definition at line 1277 of file ezcontentobject.php.

References eZPersistentObject\attribute(), and eZContentObjectVersion\fetchVersion().

Referenced by copy(), createNewVersion(), removeTranslation(), serialize(), and setAlwaysAvailableLanguageID().

## ◆ dataMap()

eZContentObject::dataMap | ( |  | ) |

Return a map with all the content object attributes where the keys are the attribute identifiers.

Returns
  eZContentObjectAttribute[]

Definition at line 552 of file ezcontentobject.php.

References fetchDataMap().

## ◆ defaultLanguage()

static eZContentObject::defaultLanguage | ( |  | ) |
| static

Returns
  string|bool

Definition at line 5330 of file ezcontentobject.php.

References eZContentLanguage\fetchByLocale(), and eZContentLanguage\topPriorityLanguage().

Referenced by eZContentObjectAttribute\create(), eZContentObjectVersion\create(), create(), eZContentUpload\handleLocalFile(), eZContentUpload\handleUpload(), and eZContentClass\instantiate().

## ◆ definition()

static eZContentObject::definition | ( |  | ) |
| static

Returns the definition for the object, the default implementation is to return an empty array. It's upto each inheriting class to return a proper definition array.

The definition array is an associative array consists of these keys:

- fields: an associative array of fields which defines which database field (the key) is to fetched and how they map to object member variables (the value).
- keys: an array of fields which is used for uniquely identifying the object in the table.
- function_attributes: an associative array of attributes which maps to member functions, used for fetching data with functions.
- set_functions: an associative array of attributes which maps to member functions, used for setting data with functions.
- increment_key: the field which is incremented on table inserts.
- class_name: the classname which is used for instantiating new objecs when fetching from the database.
- sort: an associative array which defines the default sorting of lists, the key is the table field while the value is the sorting method which is either 'asc' or 'desc'.
- name: the name of the database table

Example: `public static function definition() { return array( "fields" => array( "id" => "ID", "version" => "Version", "name" => "Name" ), "keys" => array( "id", "version" ), "function_attributes" => array( "current" => "currentVersion", "class_name" => "className" ), "increment_key" => "id", "class_name" => "eZContentClass", "sort" => array( "id" => "asc" ), "name" => "ezcontentclass" ); }`

Returns
  array

Reimplemented from eZPersistentObject.

Definition at line 100 of file ezcontentobject.php.

Referenced by eZMultiplexerType\attribute(), eZSection\canBeRemoved(), fetchFilteredList(), fetchList(), fetchListCount(), and fetchSameClassListCount().

## ◆ embeddedContentObjectCount()

eZContentObject::embeddedContentObjectCount | ( |  | $fromObjectVersion = `false` | ) |

Returns the xml-embedded objects count.

See also
  relatedObjectCount()

Parameters

  int | bool | $fromObjectVersion |

Returns
  int

Definition at line 3557 of file ezcontentobject.php.

References relatedObjectCount(), and RELATION_EMBED.

## ◆ embeddedContentObjectList()

eZContentObject::embeddedContentObjectList | ( |  | $fromObjectVersion = `false`,
|  |  | $fromObjectID = `false`
| ) |  |

Returns the xml-embedded objects.

See also
  relatedObjects()

Parameters

  int | bool | $fromObjectVersion |
  int | bool | $fromObjectID |

Returns
  array|eZContentObject[]

Definition at line 3422 of file ezcontentobject.php.

References relatedObjects(), and RELATION_EMBED.

## ◆ exists()

static eZContentObject::exists | ( |  | $id | ) |
| static

Returns true, if a content object with the ID $id exists, false otherwise

Parameters

  int | $id |

Returns
  bool

Definition at line 999 of file ezcontentobject.php.

References eZPersistentObject\count(), createFetchSQLString(), and eZDB\instance().

Referenced by addContentObjectRelation().

## ◆ expireAllCache()

static eZContentObject::expireAllCache | ( |  | ) |
| static

Sets all content cache files to be expired. Both view cache and cache blocks are expired.

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Note: This is considered a internal function, instead use {

See also
  eZContentCacheManager::clearAllContentCache}

Definition at line 5947 of file ezcontentobject.php.

Referenced by eZContentCacheManager\clearAllContentCache().

## ◆ expireAllViewCache()

static eZContentObject::expireAllViewCache | ( |  | ) |
| static

Sets all view cache files to be expired

Definition at line 5932 of file ezcontentobject.php.

Referenced by eZSection\applyTo(), eZContentCacheManager\clearNodeViewCacheArray(), eZContentClassOperations\remove(), and eZContentObjectOperations\remove().

## ◆ expireComplexViewModeCache()

static eZContentObject::expireComplexViewModeCache | ( |  | ) |
| static

Sets all complex viewmode content cache files to be expired.

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 5975 of file ezcontentobject.php.

Referenced by eZContentCacheManager\clearNodeViewCacheArray().

## ◆ expireTemplateBlockCache()

static eZContentObject::expireTemplateBlockCache | ( |  | ) |
| static

Expires all template block cache. This should be expired anytime any content is published/modified or removed.

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 5962 of file ezcontentobject.php.

Referenced by eZContentCacheManager\clearTemplateBlockCache().

## ◆ eZContentObject()

eZContentObject::eZContentObject | ( |  | $row | ) |

Deprecated:
  Use eZContentObject::__construct() instead

Parameters

  int | array | $row |

Definition at line 95 of file ezcontentobject.php.

References __construct().

Referenced by create(), fetch(), fetchForUpdate(), fetchIDArray(), and relatedObjects().

## ◆ fetch()

static eZContentObject::fetch | ( |  | $id,
|  |  | $asObject = `true`
| ) |  |
| static

Fetches a content object by ID

Parameters

  int | $id | ID of the content object to fetch
  bool | $asObject | Return the result as an object (true) or an assoc. array (false)

Returns
  eZContentObject

Definition at line 885 of file ezcontentobject.php.

References eZPersistentObject\count(), createFetchSQLString(), eZContentObject(), eZDB\instance(), and eZDebug\writeError().

Referenced by eZContentObjectTreeNode\addChildTo(), eZObjectRelationListType\appendObject(), eZRole\assignToUser(), checkGroupLimitationAccess(), eZContentCacheManager\clearTemplateBlockCache(), eZWorkflowProcess\content(), eZUser\contentObject(), eZContentObjectVersion\contentObject(), eZInformationCollectionAttribute\contentObject(), eZProductCollectionItem\contentObject(), eZContentObjectTreeNodeOperations\copyPublishContentObject(), eZContentObjectTreeNode\creator(), eZContentObjectVersion\creator(), eZObjectRelationListType\customObjectAttributeHTTPAction(), eZApproveType\execute(), eZMultiplexerType\execute(), eZWaitUntilDateType\execute(), eZFinishUserRegisterType\execute(), fetchByRemoteID(), eZApproveType\fetchHTTPInput(), eZURLObjectLink\fetchObjectVersionList(), eZRole\fetchRolesByLimitation(), eZRole\fetchUserByRole(), eZObjectRelationType\fromString(), eZObjectRelationListType\fromString(), eZRSSExport\generateFeed(), eZContentObjectPackageHandler\generateFetchAliasArray(), eZContentCacheManager\generateObjectViewCache(), eZObjectRelationListType\handleCustomObjectHTTPActions(), eZUser\hasStoredLogin(), eZImageAliasHandler\initializeFromFile(), eZObjectRelationListType\initializeObjectAttribute(), eZContentObjectPackageHandler\installSuspendedNodeAssignment(), eZTextFileUser\loginUser(), eZObjectRelationListType\metaData(), eZOrderStatusHistory\modifier(), eZContentCacheManager\nodeList(), eZContentCacheManager\nodeListForObject(), eZContentObjectAttribute\object(), eZContentObjectTreeNode\object(), eZInformationCollection\object(), eZObjectRelationType\objectAttributeContent(), eZObjectRelationListType\onPublish(), owner(), eZCollaborationItemParticipantLink\participant(), eZOrder\productList(), eZContentUpload\publishObject(), eZLDAPUser\publishUpdateUser(), eZContentObjectOperations\remove(), eZObjectRelationType\removeContentObjectRelation(), eZSiteInstaller\renameContentObject(), eZObjectRelationType\serializeContentObjectAttribute(), eZObjectRelationListType\serializeContentObjectAttribute(), eZObjectRelationListType\title(), eZXMLTextType\transformLinksToRemoteLinks(), eZSiteInstaller\updateContentObjectAttributes(), eZContentObjectTreeNode\updateMainNodeID(), eZSiteInstaller\updateObjectAttributeFromString(), eZApproveType\validateGroupIDList(), eZObjectRelationListType\validateObjectAttributeHTTPInput(), and eZApproveType\validateUserIDList().

## ◆ fetchAttributesByIdentifier()

eZContentObject::fetchAttributesByIdentifier | ( |  | $identifierArray,
|  |  | $version = `false`,
|  |  | $languageArray = `false`,
|  |  | $asObject = `true`
| ) |  |

Fetches a set of content object attributes by their class identifiers.

Parameters

  string[] | $identifierArray |
  int | bool | $version |
  string[] | bool | $languageArray |
  bool | $asObject | If true, returns an array of eZContentObjectAttributes, a normal array otherwise

Returns
  eZContentObjectAttribute[]|array|null

Definition at line 681 of file ezcontentobject.php.

References eZPersistentObject\$CurrentVersion, eZPersistentObject\count(), eZDB\instance(), eZContentLanguage\sqlFilter(), and eZContentClass\VERSION_STATUS_DEFINED.

## ◆ fetchByNodeID()

static eZContentObject::fetchByNodeID | ( |  | $nodeID,
|  |  | $asObject = `true`
| ) |  |
| static

Fetches the contentobject which has a node with ID $nodeID

$nodeID can also be an array of NodeIDs. In this case, an array of content objects will be returned

Parameters

  int | array | $nodeID | Single nodeID or array of NodeIDs
  bool | $asObject | If results have to be returned as eZContentObject instances or not

Returns
  eZContentObject|eZContentObject[]|array|null Content object or array of content objects. Content objects can be eZContentObject instances or array result sets

Examples
  /web/vh/ezpublish.se7enx.com/doc/api.exponential.earth/src/exponential/kernel/classes/ezurlaliasml.php.

Definition at line 1072 of file ezcontentobject.php.

References eZDB\instance(), eZContentLanguage\sqlFilter(), and eZDebug\writeError().

Referenced by eZMultiplexerType\execute(), eZURLAliasML\fetchPathByActionList(), eZNodeAssignment\getParentObject(), eZXMLTextType\getRelatedObjectList(), eZContentCacheManager\nodeListForObject(), and eZContentObjectTreeNode\updateMainNodeID().

## ◆ fetchByRemoteID()

static eZContentObject::fetchByRemoteID | ( |  | $remoteID,
|  |  | $asObject = `true`
| ) |  |
| static

Returns a contentobject by remote ID

Parameters

  string | $remoteID |
  bool | $asObject |

Returns
  eZContentObject|array|null

Definition at line 865 of file ezcontentobject.php.

References eZPersistentObject\count(), fetch(), and eZDB\instance().

Referenced by eZContentObjectPackageHandler\installContentObjects(), eZContentObjectPackageHandler\installFetchAliases(), eZContentObjectPackageHandler\installOverrides(), eZContentObjectPackageHandler\installSuspendedObjectRelations(), eZTextFileUser\loginUser(), eZObjectRelationType\postUnserializeContentObjectAttribute(), eZObjectRelationListType\postUnserializeContentObjectAttribute(), eZXMLTextType\transformRemoteLinksToLinks(), eZContentObjectPackageHandler\uninstall(), eZContentObjectVersion\unserialize(), and eZObjectRelationType\unserializeContentObjectAttribute().

## ◆ fetchClassAttributes()

eZContentObject::fetchClassAttributes | ( |  | $version = `0`,
|  |  | $asObject = `true`
| ) |  |

Returns the attributes for the content object version $version and content object $contentObjectID.

Parameters

  int | $version |
  bool | $asObject |

Returns
  eZContentClassAttribute[]|array|null

Definition at line 5424 of file ezcontentobject.php.

References eZPersistentObject\attribute(), and eZContentClassAttribute\fetchListByClassID().

Referenced by serialize().

## ◆ fetchDataMap()

eZContentObject::fetchDataMap | ( |  | $version = `false`,
|  |  | $language = `false`
| ) |  |

Returns a map with all the content object attributes where the keys are the attribute identifiers.

Parameters

  int | bool | $version |
  string | bool | $language |

Returns
  eZContentObjectAttribute[]

Definition at line 609 of file ezcontentobject.php.

References $CurrentLanguage, $ID, eZPersistentObject\attribute(), and contentObjectAttributes().

Referenced by dataMap(), fetchInput(), and groupedDataMap().

## ◆ fetchFilteredList()

static eZContentObject::fetchFilteredList | ( |  | $conditions = `null`,
|  |  | $offset = `false`,
|  |  | $limit = `false`,
|  |  | $asObject = `true`
| ) |  |
| static

Returns a filtered array of content objects.

Parameters

  array | null | $conditions | Optional conditions to limit the fetch
  int | bool | $offset | Where to start fetch from, set to false to skip it.
  int | bool | $limit | Maximum number of objects to fetch, set false to skip it.
  bool | $asObject | Whether to return objects or not

Returns
  array|eZPersistentObject[]|null

Definition at line 1207 of file ezcontentobject.php.

References definition(), and eZPersistentObject\fetchObjectList().

Referenced by fetchSameClassList().

## ◆ fetchForUpdate()

static eZContentObject::fetchForUpdate | ( |  | $id,
|  |  | $asObject = `true`
| ) |  |
| static

Fetches a content object by ID, using SELECT ... FOR UPDATE

Ensures the table row is locked, blocking other transactions from locking it (read or write). Usage must be within a transaction, or it will be locked for the current session.

Parameters

  int | $id | ID of the content object to fetch
  bool | $asObject | Return the result as an object (true) or an assoc. array (false)

Returns
  eZContentObject|mixed|null

Definition at line 943 of file ezcontentobject.php.

References eZPersistentObject\count(), eZContentObject(), eZDB\instance(), and eZDebug\writeError().

## ◆ fetchIDArray()

static eZContentObject::fetchIDArray | ( |  | $idArray,
|  |  | $asObject = `true`,
|  |  | $lang = `false`
| ) |  |
| static

Fetches a content object list based on an array of content object ids

Parameters

  array | $idArray | array of content object ids
  bool | $asObject | Wether to get the result as an array of eZContentObject or an array of associative arrays
  bool | string | $lang | A language code to put at the top of the prioritized languages list.

Returns
  array(contentObjectID => eZContentObject|array) array of eZContentObject (if $asObject = true) or array of associative arrays (if $asObject = false)

Definition at line 1132 of file ezcontentobject.php.

References eZContentObject(), eZDB\instance(), eZContentClass\nameFromSerializedString(), and eZContentLanguage\sqlFilter().

Referenced by eZContentCacheManager\clearTemplateBlockCache(), and eZXMLOutputHandler\prefetch().

## ◆ fetchInput()

eZContentObject::fetchInput | ( |  | $contentObjectAttributes,
|  |  | $attributeDataBaseName,
|  |  | $customActionAttributeArray,
|  |  | $customActionParameters
| ) |  |

Parameters

  eZContentObjectAttribute[] | $contentObjectAttributes |
  string | $attributeDataBaseName |
  array | $customActionAttributeArray |
  array | $customActionParameters |

Returns
  array

Definition at line 2580 of file ezcontentobject.php.

References eZPersistentObject\$CurrentVersion, $ID, fetchDataMap(), handleCustomHTTPActions(), initialLanguageCode(), and eZHTTPTool\instance().

## ◆ fetchList()

static eZContentObject::fetchList | ( |  | $asObject = `true`,
|  |  | $conditions = `null`,
|  |  | $offset = `false`,
|  |  | $limit = `false`
| ) |  |
| static

Returns an array of content objects.

Parameters

  bool | $asObject | Whether to return objects or not
  array | null | $conditions | Optional conditions to limit the fetch
  int | bool | $offset | Where to start fetch from, set to false to skip it.
  int | bool | $limit | Maximum number of objects to fetch, set false to skip it.

Returns
  eZContentObject[]|array|null

Definition at line 1185 of file ezcontentobject.php.

References definition(), and eZPersistentObject\fetchObjectList().

Referenced by eZContentCacheManager\clearContentCacheIfNeededBySectionID(), eZSiteInstaller\contentObjectByName(), and eZOrder\orderStatistics().

## ◆ fetchListCount()

static eZContentObject::fetchListCount | ( |  | $conditions = `null` | ) |
| static

Returns the number of objects in the database. Optionally $conditions can be used to limit the list count.

Parameters

  array | null | $conditions |

Returns
  int

Definition at line 1224 of file ezcontentobject.php.

References definition(), and eZPersistentObject\fetchObjectList().

## ◆ fetchObjectCountByUserID()

static eZContentObject::fetchObjectCountByUserID | ( |  | $classID,
|  |  | $userID,
|  |  | $status = `false`
| ) |  |
| static

Returns the number of objects of the given class is created by the given user.

Parameters

  int | $classID |
  int | $userID |
  int | bool | $status |

Returns
  int

Definition at line 6062 of file ezcontentobject.php.

References eZDB\instance().

## ◆ fetchSameClassList()

static eZContentObject::fetchSameClassList | ( |  | $contentClassID,
|  |  | $asObject = `true`,
|  |  | $offset = `false`,
|  |  | $limit = `false`
| ) |  |
| static

Returns an array of content objects with the content class id $contentClassID

Parameters

  int | $contentClassID |
  bool | $asObject | Whether to return objects or not
  int | bool | $offset | Where to start fetch from, set to false to skip it.
  int | bool | $limit | Maximum number of objects to fetch, set false to skip it.

Returns
  eZContentObject[]|array|null

Definition at line 1247 of file ezcontentobject.php.

References fetchFilteredList().

Referenced by eZSiteInstaller\addClassAttributes(), eZContentClassAttribute\initializeObjectAttributes(), eZContentClass\objectList(), and eZContentClassOperations\remove().

## ◆ fetchSameClassListCount()

static eZContentObject::fetchSameClassListCount | ( |  | $contentClassID | ) |
| static

Returns the number of content objects with the content class id $contentClassID

Parameters

  int | $contentClassID |

Returns
  int

Definition at line 1259 of file ezcontentobject.php.

References definition(), and eZPersistentObject\fetchObjectList().

Referenced by eZContentClassPackageHandler\install(), and eZContentClassPackageHandler\uninstall().

## ◆ fillNodeListAttributes()

static eZContentObject::fillNodeListAttributes | ( |  | $objList,
|  |  | $asObject = `true`
| ) |  |
| static

Fetches the attributes for an array of objects or nodes

Parameters

  eZContentObject[] | eZContentObjectTreeNode[] | $objList |
  bool | $asObject |

Definition at line 2290 of file ezcontentobject.php.

References eZPersistentObject\count(), and eZDB\instance().

Referenced by eZTreeMenuOperator\modify(), relatedObjects(), and eZContentObjectTreeNode\subTreeByNodeID().

## ◆ fixReverseRelations()

static eZContentObject::fixReverseRelations | ( |  | $objectID,
|  |  | $mode = `false`,
|  |  | $clearCacheIfEnabled = `true`
| ) |  |
| static

Fixes reverse relations

See also
  eZObjectRelationListType::fixRelatedObjectItem()

Parameters

  int | $objectID |
  string | bool | $mode | See eZObjectRelationListType::fixRelatedObjectItem() for valid modes
  bool | $clearCacheIfEnabled | If set to false cache won't be cleared

Definition at line 1843 of file ezcontentobject.php.

References eZContentCacheManager\clearObjectViewCacheArray(), eZPersistentObject\count(), and eZDB\instance().

Referenced by purge(), and removeThis().

## ◆ fixupInput()

eZContentObject::fixupInput | ( |  | $contentObjectAttributes,
|  |  | $attributeDataBaseName
| ) |  |

Parameters

  eZContentObjectAttribute[] | $contentObjectAttributes |
  string | $attributeDataBaseName |

Definition at line 2564 of file ezcontentobject.php.

References eZHTTPTool\instance().

## ◆ getVersionCount()

eZContentObject::getVersionCount | ( |  | ) |

Returns the number of existing versions.

Returns
  mixed

Definition at line 2786 of file ezcontentobject.php.

References eZDB\instance().

Referenced by createNewVersion().

## ◆ groupedDataMap()

eZContentObject::groupedDataMap | ( |  | ) |

Generates a map with all the content object attributes where the keys are the attribute identifiers grouped by class attribute category.

Result is not cached, so make sure you don't call this over and over.

Returns
  array

Definition at line 565 of file ezcontentobject.php.

References createGroupedDataMap(), and fetchDataMap().

## ◆ handleAllCustomHTTPActions()

eZContentObject::handleAllCustomHTTPActions | ( |  | $attributeDataBaseName,
|  |  | $customActionAttributeArray,
|  |  | $customActionParameters,
|  |  | $objectVersion = `false`
| ) |  |

Parameters

  string | $attributeDataBaseName |
  array | $customActionAttributeArray |
  array | $customActionParameters |
  int | bool | $objectVersion |

Definition at line 2667 of file ezcontentobject.php.

References contentObjectAttributes(), and eZHTTPTool\instance().

## ◆ handleCustomHTTPActions()

eZContentObject::handleCustomHTTPActions | ( |  | $contentObjectAttribute,
|  |  | $attributeDataBaseName,
|  |  | $customActionAttributeArray,
|  |  | $customActionParameters
| ) |  |

Parameters

  eZContentObjectAttribute | $contentObjectAttribute |
  string | $attributeDataBaseName |
  array | $customActionAttributeArray |
  array | $customActionParameters |

Definition at line 2645 of file ezcontentobject.php.

References eZHTTPTool\instance().

Referenced by fetchInput().

## ◆ hasContentAction()

eZContentObject::hasContentAction | ( |  | $name | ) |

Returns true if the given content action is in the content action list

Parameters

  string | $name | Name of the content action

Returns
  bool

Definition at line 5264 of file ezcontentobject.php.

Referenced by contentActionList().

## ◆ hasRemainingVersions()

eZContentObject::hasRemainingVersions | ( |  | ) |

Returns true if the object has any versions remaining.

Returns
  bool

Definition at line 1374 of file ezcontentobject.php.

References eZPersistentObject\count(), and versions().

## ◆ hasVisibleNode()

eZContentObject::hasVisibleNode | ( |  | ) |

Returns whether the current object has at least one visible node.

The setting site.ini/[SiteAccessSettings]/ShowHiddenNodes is taken into account, ie an hidden (or hidden by superior) node is considered visible if ShowHiddenNodes is true.

Returns
  boolean

Definition at line 3893 of file ezcontentobject.php.

References eZPersistentObject\attribute(), and eZDB\instance().

## ◆ initialLanguage()

eZContentObject::initialLanguage | ( |  | ) |

Returns the current object's initial language object, or false if not set

Returns
  eZContentLanguage|bool

Definition at line 2840 of file ezcontentobject.php.

References eZContentLanguage\fetch().

Referenced by createNewVersion(), initialLanguageCode(), and setName().

## ◆ initialLanguageCode()

eZContentObject::initialLanguageCode | ( |  | ) |

Returns the current object's initial language code, or false if not set

Returns
  string|bool

Definition at line 2850 of file ezcontentobject.php.

References initialLanguage().

Referenced by contentActionList(), fetchInput(), and validateInput().

## ◆ isAlwaysAvailable()

eZContentObject::isAlwaysAvailable | ( |  | ) |

Returns
  int

Definition at line 6301 of file ezcontentobject.php.

References eZPersistentObject\attribute().

Referenced by copyVersion().

## ◆ isCacheExpired()

static eZContentObject::isCacheExpired | ( |  | $timestamp | ) |
| static

Returns true if the content cache timestamp $timestamp is expired.

Parameters

  int | $timestamp | UNIX Timestamp

Returns
  bool

Definition at line 5988 of file ezcontentobject.php.

Referenced by eZNodeviewfunctions\contentViewRetrieve(), eZContentCache\exists(), and eZContentCache\restore().

## ◆ isComplexViewMode()

static eZContentObject::isComplexViewMode | ( |  | $viewMode | ) |
| static

Returns true if the viewmode is a complex viewmode.

Parameters

  string | $viewMode |

Returns
  bool

Definition at line 6005 of file ezcontentobject.php.

Referenced by isComplexViewModeCacheExpired().

## ◆ isComplexViewModeCacheExpired()

static eZContentObject::isComplexViewModeCacheExpired | ( |  | $viewMode,
|  |  | $timestamp
| ) |  |
| static

Returns true if the viewmode is a complex viewmode and the viewmode timestamp is expired.

Parameters

  string | $viewMode |
  int | $timestamp | UNIX Timestamp

Returns
  bool

Definition at line 6019 of file ezcontentobject.php.

References isComplexViewMode().

Referenced by eZContentCache\exists(), and eZContentCache\restore().

## ◆ isObjectRelationTyped()

static eZContentObject::isObjectRelationTyped | ( |  | ) |
| static

Returns
  bool

Definition at line 3107 of file ezcontentobject.php.

Referenced by relationTypeMask().

## ◆ languages()

eZContentObject::languages | ( |  | ) |

Returns
  eZContentLanguage[]|array

Definition at line 5311 of file ezcontentobject.php.

References eZContentLanguage\prioritizedLanguagesByMask().

Referenced by availableLanguages().

## ◆ linkedContentObjectCount()

eZContentObject::linkedContentObjectCount | ( |  | $fromObjectVersion = `false` | ) |

Returns the xml-linked objects count.

See also
  relatedObjectCount()

Parameters

  int | bool | $fromObjectVersion |

Returns
  int

Definition at line 3541 of file ezcontentobject.php.

References relatedObjectCount(), and RELATION_LINK.

## ◆ linkedContentObjectList()

eZContentObject::linkedContentObjectList | ( |  | $fromObjectVersion = `false`,
|  |  | $fromObjectID = `false`
| ) |  |

Returns the xml-linked objects.

See also
  relatedObjects()

Parameters

  int | bool | $fromObjectVersion |
  int | bool | $fromObjectID |

Returns
  array|eZContentObject[]

Definition at line 3404 of file ezcontentobject.php.

References relatedObjects(), and RELATION_LINK.

## ◆ mainNode()

eZContentObject::mainNode | ( |  | ) |

Returns the main node id for the current object.

Returns
  int|null

Definition at line 3982 of file ezcontentobject.php.

References eZPersistentObject\attribute(), and eZContentObjectTreeNode\findMainNode().

Referenced by eZNodeviewfunctions\generateNodeViewData().

## ◆ mainNodeID()

eZContentObject::mainNodeID | ( |  | ) |

Returns the main node id for the current object and sets the attribute MainNodeID in the current object

Returns
  int|null

Definition at line 3967 of file ezcontentobject.php.

References $MainNodeID, eZPersistentObject\attribute(), and eZContentObjectTreeNode\findMainNode().

## ◆ mainParentNodeID()

eZContentObject::mainParentNodeID | ( |  | ) |

Returns the ID of the the current object's main node

Returns
  int|null

Definition at line 852 of file ezcontentobject.php.

References eZContentObjectTreeNode\getParentNodeIdListByContentObjectID().

## ◆ mapLanguage()

static eZContentObject::mapLanguage | ( |  | $language,
|  |  | $options
| ) |  |
| static

Maps input lange to another one if defined in $options['language_map'].

If it cannot map it returns the original language.

Parameters

  string | $language |
  array | $options |

Returns
  string

Definition at line 5438 of file ezcontentobject.php.

## ◆ matchIngroupIDList()

eZContentObject::matchIngroupIDList | ( |  | ) |

Get class groups this object's class belongs to if match for class groups is enabled, otherwise false

Returns
  array|bool

Definition at line 240 of file ezcontentobject.php.

References contentClass().

## ◆ name()

bool string Stores the current class eZContentObject::name | ( |  | $version = `false`,
|  |  | $lang = `false`
| ) |  |

Returns an object's name for the version given by $version in the language given by $lang

Parameters

  int | bool | $version | If omitted, the current version will be used
  bool | $lang | If omitted, the initial object language will be used

Returns
  bool|string

Definition at line 340 of file ezcontentobject.php.

References $CurrentLanguage, $Name, eZPersistentObject\attribute(), and versionLanguageName().

## ◆ names()

eZContentObject::names | ( |  | ) |

Returns all translations of the current object's name

Returns
  string[]

Definition at line 365 of file ezcontentobject.php.

References eZPersistentObject\attribute(), and eZDB\instance().

## ◆ nextVersion()

eZContentObject::nextVersion | ( |  | ) |

Returns the next available version number for this object.

Returns
  int

Definition at line 2751 of file ezcontentobject.php.

References eZDB\instance().

Referenced by createNewVersion().

## ◆ owner()

eZContentObject::owner | ( |  | ) |

Returns the owner of the object as a content object.

Returns
  eZContentObject|null

Definition at line 768 of file ezcontentobject.php.

References fetch().

## ◆ parentNodeIDArray()

eZContentObject::parentNodeIDArray | ( |  | ) |

Returns an array of parent node IDs

Returns
  int[]

Definition at line 3751 of file ezcontentobject.php.

References parentNodes().

## ◆ parentNodes()

eZContentObject::parentNodes | ( |  | $version = `false`,
|  |  | $asObject = `true`
| ) |  |

Returns the parent nodes for the current object.

Parameters

  int | bool | $version | No longer in use, published nodes are used instead.
  bool | $asObject | If true it fetches PHP objects, otherwise it fetches IDs.

Returns
  eZContentObjectTreeNode[]|int[]

Definition at line 3763 of file ezcontentobject.php.

References eZContentObjectTreeNode\fetch(), and eZContentObjectTreeNode\getParentNodeIdListByContentObjectID().

Referenced by parentNodeIDArray().

## ◆ permissions()

eZContentObject::permissions | ( |  | ) |

Returns the permission for the current object.

Returns
  array

Definition at line 4002 of file ezcontentobject.php.

References $Permissions.

## ◆ postUnserialize()

eZContentObject::postUnserialize | ( |  | $package | ) |

Performs additional unserialization actions that need to be performed when all objects contained in the package are already installed. (maintain objects' cross-relations)

Parameters

  mixed | $package |

Definition at line 5787 of file ezcontentobject.php.

References versions().

## ◆ previousVersion()

eZContentObject::previousVersion | ( |  | ) |

Returns the previous available version number for this object, if existing, false otherwise ( if the object has only one version )

Returns
  int|bool

Definition at line 2765 of file ezcontentobject.php.

References eZPersistentObject\count(), and eZDB\instance().

## ◆ publishedVersion()

eZContentObject::publishedVersion | ( |  | ) |

Returns the published version of the object, or null if not published yet.

Returns
  int|null

Definition at line 1287 of file ezcontentobject.php.

References eZContentObjectVersion\STATUS_PUBLISHED, and versions().

## ◆ purge()

eZContentObject::purge | ( |  | ) |

Deletes the current object, all versions and translations, and corresponding tree nodes from the database

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 1877 of file ezcontentobject.php.

References $ID, allContentObjectAttributes(), eZPersistentObject\attribute(), eZPersistentObject\count(), eZProductCollectionItem\definition(), eZWishList\definition(), eZWorkflowType\fetchRegisteredTypes(), fixReverseRelations(), eZDB\instance(), eZContentObjectTrashNode\purgeForObject(), eZInformationCollection\removeContentObject(), eZPersistentObject\removeObject(), eZSearch\removeObjectById(), and eZAudit\writeAudit().

## ◆ recursionProtect()

static eZContentObject::recursionProtect | ( |  | $id | ) |
| static

Parameters

  int | $id |

Returns
  bool

Definition at line 2702 of file ezcontentobject.php.

Referenced by eZObjectRelationListType\handleCustomObjectHTTPActions().

## ◆ recursionProtectionEnd()

static eZContentObject::recursionProtectionEnd | ( |  | ) |
| static

Definition at line 2718 of file ezcontentobject.php.

## ◆ recursionProtectionStart()

static eZContentObject::recursionProtectionStart | ( |  | ) |
| static

Definition at line 2693 of file ezcontentobject.php.

## ◆ relatedContentObjectArray()

eZContentObject::relatedContentObjectArray | ( |  | $fromObjectVersion = `false`,
|  |  | $fromObjectID = `false`,
|  |  | $attributeID = `0`,
|  |  | $params = `false`
| ) |  |

Left for compatibility

See also
  relatedObjects()

Deprecated:

Parameters

  bool | $fromObjectVersion |
  bool | $fromObjectID |
  int | $attributeID |
  bool | $params |

Returns
  array

Definition at line 3481 of file ezcontentobject.php.

References relatedContentObjectList().

## ◆ relatedContentObjectCount()

eZContentObject::relatedContentObjectCount | ( |  | $fromObjectVersion = `false`,
|  |  | $attributeID = `0`,
|  |  | $params = `false`
| ) |  |

Returns the number of related objects

See also
  relatedObjectCount()

Parameters

  int | bool | $fromObjectVersion |
  int | bool | $attributeID |
  array | bool | $params |

Returns
  int

Definition at line 3503 of file ezcontentobject.php.

References relatedObjectCount(), and eZDebugSetting\writeDebug().

## ◆ relatedContentObjectList()

eZContentObject::relatedContentObjectList | ( |  | $fromObjectVersion = `false`,
|  |  | $fromObjectID = `false`,
|  |  | $attributeID = `0`,
|  |  | $groupByAttribute = `false`,
|  |  | $params = `false`
| ) |  |

Returns related objects.

See also
  relatedObjects()

Parameters

  int | bool | $fromObjectVersion |
  int | bool | $fromObjectID |
  int | bool | $attributeID |
  bool | $groupByAttribute |
  array | bool | $params |

Returns
  array|eZContentObject[]

Definition at line 3385 of file ezcontentobject.php.

References relatedObjects(), and eZDebugSetting\writeDebug().

Referenced by relatedContentObjectArray().

## ◆ relatedObjectCount()

eZContentObject::relatedObjectCount | ( |  | $version = `false`,
|  |  | $attributeID = `0`,
|  |  | $reverseRelatedObjects = `false`,
|  |  | $params = `false`
| ) |  |

Fetch the number of (reverse) related objects

Parameters

  bool | int | $version |
  int | $attributeID | This parameter only makes sense if $params[AllRelations] is unset, set to false, or matches eZContentObject::RELATION_ATTRIBUTE Possible values: 0 or false: Count relations made with any attribute >0 Count relations made with attribute $attributeID
  int | bool | $reverseRelatedObjects | Wether to count related objects (false) or reverse related objects (false)
  array | bool | $params | Various params, as an associative array. Possible values: AllRelations (bool|int) true: count ALL relations, object and attribute level false: only count object level relations other: bit mask of eZContentObject::RELATION_* constants IgnoreVisibility (bool) If true, 'hidden' status will be ignored

Returns
  int The number of (reverse) related objects for the object

Definition at line 3624 of file ezcontentobject.php.

References $ID, eZPersistentObject\count(), createFilterByVisibilitySQLString(), eZDB\instance(), RELATION_ATTRIBUTE, relationTypeMask(), and STATUS_PUBLISHED.

Referenced by embeddedContentObjectCount(), linkedContentObjectCount(), relatedContentObjectCount(), reverseEmbeddedObjectCount(), reverseLinkedObjectCount(), and reverseRelatedObjectCount().

## ◆ relatedObjects()

eZContentObject::relatedObjects | ( |  | $fromObjectVersion = `false`,
|  |  | $objectID = `false`,
|  |  | $attributeID = `0`,
|  |  | $groupByAttribute = `false`,
|  |  | $params = `false`,
|  |  | $reverseRelatedObjects = `false`
| ) |  |

Returns related or reverse related objects

Parameters

  int | bool | $fromObjectVersion | If omitted, the current version will be used
  int | bool | $objectID | If omitted, the current object will be used
  int | bool | $attributeID | makes sense only when $params['AllRelations'] not set or eZContentObject::RELATION_ATTRIBUTE $attributeID = 0|false ( $params['AllRelations'] is eZContentObject::RELATION_ATTRIBUTE ) return relations made with any attributes $attributeID > 0 return relations made with attribute ID ( "related object(s)" datatype ) $attributeID = false ( $params['AllRelations'] not set ) return ALL relations (deprecated, use "$params['AllRelations'] = true" instead)
  bool | $groupByAttribute | This parameter makes sense only when $attributeID == false or $params['AllRelations'] = true $groupByAttribute = false return all relations as an array of content objects $groupByAttribute = true return all relations groupped by attribute ID
  array | bool | $params | Other parameters from template fetch function $params['AllRelations'] = true return ALL relations, including attribute-level $params['AllRelations'] = false return objec level relations only $params['AllRelations'] = int > 0 bit mask of EZ_CONTENT_OBJECT_RELATION_* values $params['SortBy'] Possible values: "class_identifier", "class_name", "modified", "name", "published", "section" $params['IgnoreVisibility'] = true Include related objects with a 'hidden' state $params['IgnoreVisibility'] = false Exclude related objects with a 'hidden' state $params['RelatedClassIdentifiers'] = array limit returned relations to objects of the specified class identifiers
  bool | $reverseRelatedObjects | true -> returns reverse related objects false -> returns related objects

Returns
  eZContentObject[]|array eZContentObject[], if $params['AsObject'] is set to true (default), array otherwise

Definition at line 3180 of file ezcontentobject.php.

References $ID, eZPersistentObject\count(), createFilterByVisibilitySQLString(), eZContentObjectTreeNode\createSortingSQLStrings(), eZContentObject(), fillNodeListAttributes(), eZDB\instance(), eZContentClass\nameFromSerializedString(), RELATION_ATTRIBUTE, relationTypeMask(), eZContentLanguage\sqlFilter(), STATUS_PUBLISHED, and eZDebug\writeWarning().

Referenced by commitInputRelations(), embeddedContentObjectList(), linkedContentObjectList(), relatedContentObjectList(), reverseEmbeddedObjectList(), reverseLinkedObjectList(), and reverseRelatedObjectList().

## ◆ relationTypeMask()

static eZContentObject::relationTypeMask | ( |  | $allRelations = `false` | ) |
| static

Parameters

  bool | $allRelations |

Returns
  int

Definition at line 3124 of file ezcontentobject.php.

References isObjectRelationTyped(), RELATION_ATTRIBUTE, RELATION_COMMON, RELATION_EMBED, and RELATION_LINK.

Referenced by relatedObjectCount(), and relatedObjects().

## ◆ remoteID()

eZContentObject::remoteID | ( |  | ) |

Returns the remote id of the current content object

Returns
  string

Definition at line 832 of file ezcontentobject.php.

References eZPersistentObject\attribute(), eZRemoteIdUtility\generate(), eZPersistentObject\setAttribute(), and eZPersistentObject\sync().

## ◆ removeContentObjectRelation()

eZContentObject::removeContentObjectRelation | ( |  | $toObjectID = `false`,
|  |  | $fromObjectVersion = `false`,
|  |  | $attributeID = `0`,
|  |  | $relationType = `eZContentObject::RELATION_COMMON`
| ) |  |

Removes a link to the given content object id.

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  int | bool | $toObjectID | If false it will delete relations to all the objects.
  bool | $fromObjectVersion |
  int | $attributeID | ID of class attribute. If it is > 0 we remove relations created by a specific objectrelation[list] attribute. If it is set to 0 we remove relations created without using of objectrelation[list] attribute. If it is set to false, we remove all relations, no matter how were they created: using objectrelation[list] attribute or using "Add related objects" functionality in obect editing mode.
  int | $relationType |

Definition at line 2996 of file ezcontentobject.php.

References eZPersistentObject\$CurrentVersion, $ID, eZDB\instance(), and RELATION_ATTRIBUTE.

Referenced by commitInputRelations().

## ◆ removeThis()

eZContentObject::removeThis | ( |  | $nodeID = `null` | ) |

Archives the current object and removes assigned nodes

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  int | $nodeID |

Definition at line 2015 of file ezcontentobject.php.

References $ID, eZPersistentObject\attribute(), eZPersistentObject\count(), eZContentObjectTreeNode\fetch(), fixReverseRelations(), eZDB\instance(), eZContentObjectTreeNode\removeNode(), eZSearch\removeObjectById(), eZPersistentObject\setAttribute(), STATUS_ARCHIVED, store(), and eZAudit\writeAudit().

## ◆ removeTranslation()

eZContentObject::removeTranslation | ( |  | $languageID | ) |

Removes a translation from the current object

Parameters

  int | $languageID |

Returns
  bool

Definition at line 6180 of file ezcontentobject.php.

References $ID, assignedNodes(), eZPersistentObject\attribute(), checkAccess(), currentVersion(), eZContentLanguage\fetch(), eZDB\instance(), eZContentLanguage\maskForRealLanguages(), eZURLAliasML\removeSingleEntry(), eZPersistentObject\setAttribute(), store(), and versions().

## ◆ removeVersions()

static eZContentObject::removeVersions | ( |  | $versionStatus = `false` | ) |
| static

Parameters

  int | bool | $versionStatus |

Deprecated:
  This method is left here only for backward compatibility. Use eZContentObjectVersion::removeVersions() method instead.

Definition at line 6081 of file ezcontentobject.php.

References eZContentObjectVersion\removeVersions().

## ◆ rename()

eZContentObject::rename | ( |  | $newName | ) |

Sets the object's name to $newName: tries to find attributes that are in 'object pattern name' and updates them

Parameters

  string | $newName |

Returns
  bool true if object's name was changed, otherwise false.

Definition at line 6092 of file ezcontentobject.php.

References eZPersistentObject\attribute(), contentClass(), eZPersistentObject\count(), createNewVersion(), and eZOperationHandler\execute().

## ◆ resetDataMap()

eZContentObject::resetDataMap | ( |  | ) |

Resets (empties) the current object's data map

Returns
  array

Definition at line 663 of file ezcontentobject.php.

References $DataMap.

Referenced by __clone().

## ◆ resetInputRelationList()

eZContentObject::resetInputRelationList | ( |  | ) |

Resets the object's input relation list

Definition at line 2367 of file ezcontentobject.php.

References RELATION_EMBED, and RELATION_LINK.

Referenced by appendInputRelationList(), and validateInput().

## ◆ restoreObjectAttributes()

eZContentObject::restoreObjectAttributes | ( |  | ) |

Restores attributes for current content object when it's being restored from trash

Definition at line 6669 of file ezcontentobject.php.

References allContentObjectAttributes(), eZPersistentObject\attribute(), eZDB\instance(), and eZDebug\writeError().

## ◆ reverseEmbeddedObjectCount()

eZContentObject::reverseEmbeddedObjectCount | ( |  | $fromObjectVersion = `false` | ) |

Returns the reverse xml-embedded objects count.

See also
  relatedObjectCount()

Parameters

  int | bool | $fromObjectVersion |

Returns
  int

Definition at line 3589 of file ezcontentobject.php.

References relatedObjectCount(), and RELATION_EMBED.

## ◆ reverseEmbeddedObjectList()

eZContentObject::reverseEmbeddedObjectList | ( |  | $fromObjectVersion = `false`,
|  |  | $fromObjectID = `false`
| ) |  |

Returns the reverse xml-embedded objects.

See also
  relatedObjects()

Parameters

  int | bool | $fromObjectVersion |
  int | bool | $fromObjectID |

Returns
  array|eZContentObject[]

Definition at line 3459 of file ezcontentobject.php.

References relatedObjects(), and RELATION_EMBED.

## ◆ reverseLinkedObjectCount()

eZContentObject::reverseLinkedObjectCount | ( |  | $fromObjectVersion = `false` | ) |

Returns the reverse xml-linked objects count.

See also
  relatedObjectCount()

Parameters

  int | bool | $fromObjectVersion |

Returns
  int

Definition at line 3573 of file ezcontentobject.php.

References relatedObjectCount(), and RELATION_LINK.

## ◆ reverseLinkedObjectList()

eZContentObject::reverseLinkedObjectList | ( |  | $fromObjectVersion = `false`,
|  |  | $fromObjectID = `false`
| ) |  |

Returns the reverse xml-linked objects.

See also
  relatedObjects()

Parameters

  int | bool | $fromObjectVersion |
  int | bool | $fromObjectID |

Returns
  array|eZContentObject[]

Definition at line 3440 of file ezcontentobject.php.

References relatedObjects(), and RELATION_LINK.

## ◆ reverseRelatedObjectCount()

eZContentObject::reverseRelatedObjectCount | ( |  | $version = `false`,
|  |  | $attributeID = `0`,
|  |  | $params = `false`
| ) |  |

Returns the number of objects to which this object is related.

See also
  relatedObjectCount()

Parameters

  int | bool | $version |
  int | bool | $attributeID |
  array | bool | $params |

Returns
  int

Definition at line 3727 of file ezcontentobject.php.

References relatedObjectCount().

## ◆ reverseRelatedObjectList()

eZContentObject::reverseRelatedObjectList | ( |  | $version = `false`,
|  |  | $attributeID = `0`,
|  |  | $groupByAttribute = `false`,
|  |  | $params = `false`
| ) |  |

Returns the objects to which this object are related .

See also
  relatedObjects()

Parameters

  int | bool | $version |
  int | bool | $attributeID |
  bool | $groupByAttribute |
  array | bool | $params |

Returns
  array|eZContentObject[]

Definition at line 3525 of file ezcontentobject.php.

References relatedObjects().

Referenced by contentObjectListRelatingThis().

## ◆ sectionIdentifier()

eZContentObject::sectionIdentifier | ( |  | ) |

Returns object's section identifier

Returns
  string|bool

Definition at line 6694 of file ezcontentobject.php.

References eZPersistentObject\attribute(), and eZSection\fetch().

## ◆ serialize()

eZContentObject::serialize | ( |  | $package,
|  |  | $specificVersion = `false`,
|  |  | $options = `false`,
|  |  | $contentNodeIDArray = `false`,
|  |  | $topNodeIDArray = `false`
| ) |  |

Returns a DOM structure of the content object and it's attributes.

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  mixed | $package |
  int | bool | $specificVersion | Content object version, true for current version, false for all, else array containing specific versions.
  array | bool | $options | Package options or false
  int[] | bool | $contentNodeIDArray | Array of allowed nodes or false
  int[] | bool | $topNodeIDArray | Array of top nodes in current package export or false

Returns
  bool|DOMElement

Definition at line 5808 of file ezcontentobject.php.

References eZPersistentObject\attribute(), currentVersion(), fetchClassAttributes(), eZRemoteIdUtility\generate(), eZDateUtils\rfc1123Date(), eZPersistentObject\setAttribute(), store(), version(), and versions().

## ◆ setAlwaysAvailableLanguageID()

eZContentObject::setAlwaysAvailableLanguageID | ( |  | $languageID,
|  |  | $version = `false`
| ) |  |

Parameters

  int | $languageID |
  int | bool | $version |

Definition at line 6310 of file ezcontentobject.php.

References eZPersistentObject\attribute(), currentVersion(), eZContentObjectTreeNode\fetchByContentObjectID(), eZDB\instance(), eZPersistentObject\setAttribute(), eZURLAliasML\setLangMaskAlwaysAvailable(), and store().

## ◆ setCachedName()

eZContentObject::setCachedName | ( |  | $name | ) |

Sets the name of the object, in memory only. Use {

See also
  setName()} to change it permanently

Parameters

  string | $name |

Definition at line 468 of file ezcontentobject.php.

## ◆ setClassName()

eZContentObject::setClassName | ( |  | $name | ) |

Parameters

  string | $name |

Definition at line 5370 of file ezcontentobject.php.

## ◆ setContentObjectAttributes()

eZContentObject::setContentObjectAttributes | ( | & | $attributes,
|  |  | $version,
|  |  | $language
| ) |  |

Initializes the cached copy of the content object attributes for the given version and language

Parameters

  eZContentObjectAttribute[] | $attributes |
  int | $version |
  string | $language |

Definition at line 2279 of file ezcontentobject.php.

## ◆ setCurrentLanguage()

eZContentObject::setCurrentLanguage | ( |  | $lang | ) |

Sets the current object's language and resets the name

Parameters

  string | $lang |

Definition at line 2829 of file ezcontentobject.php.

## ◆ setDefaultLanguage()

static eZContentObject::setDefaultLanguage | ( |  | $lang | ) |
| static

Set default language. Checks if default language is valid.

Deprecated:

Parameters

  string | $lang | Default language.

Returns
  bool

Definition at line 5362 of file ezcontentobject.php.

## ◆ setName()

eZContentObject::setName | ( |  | $objectName,
|  |  | $versionNum = `false`,
|  |  | $languageCode = `false`
| ) |  |

Sets the name of the object in all translations.

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  string | $objectName |
  int | bool | $versionNum |
  int | bool | $languageCode |

Definition at line 483 of file ezcontentobject.php.

References eZPersistentObject\attribute(), eZContentLanguage\idByLocale(), initialLanguage(), and eZDB\instance().

## ◆ setPermissions()

eZContentObject::setPermissions | ( |  | $permissionArray | ) |

Sets the permissions for this object.

Parameters

  array | $permissionArray |

Definition at line 3992 of file ezcontentobject.php.

## ◆ stateIDArray()

eZContentObject::stateIDArray | ( |  | $refreshCache = `false` | ) |

Gets the current states of the content object.

Uses a member variable that caches the result.

Parameters

  bool | $refreshCache | if the cache in the member variable needs to be refreshed

Returns
  array an associative array with state group id => state id pairs

Definition at line 6561 of file ezcontentobject.php.

References $ID, $StateIDArray, eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), and eZDB\instance().

Referenced by assignState().

## ◆ stateIdentifierArray()

eZContentObject::stateIdentifierArray | ( |  | ) |

Returns
  array

Definition at line 6589 of file ezcontentobject.php.

References eZDebug\accumulatorStart(), eZDebug\accumulatorStop(), and eZDB\instance().

## ◆ store()

eZContentObject::store | ( |  | $fieldFilters = `null` | ) |

Stores the object

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  array | $fieldFilters |

Reimplemented from eZPersistentObject.

Definition at line 260 of file ezcontentobject.php.

References eZDB\instance(), and storeNodeModified().

Referenced by removeThis(), removeTranslation(), serialize(), setAlwaysAvailableLanguageID(), and eZContentFunctions\updateAndPublishObject().

## ◆ storeInput()

eZContentObject::storeInput | ( |  | $contentObjectAttributes,
|  |  | $attributeInputMap
| ) |  |

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Parameters

  eZContentObjectAttribute[] | $contentObjectAttributes |
  array | $attributeInputMap |

Definition at line 2730 of file ezcontentobject.php.

References eZDB\instance().

## ◆ storeNodeModified()

eZContentObject::storeNodeModified | ( |  | ) |

Update all nodes to set modified_subnode value

Transaction unsafe. If you call several transaction unsafe methods you must enclose the calls within a db transaction; thus within db->begin and db->commit.

Definition at line 317 of file ezcontentobject.php.

References assignedNodes(), and eZDB\instance().

Referenced by store().

## ◆ translationList()

static eZContentObject::translationList | ( |  | ) |
| static

Returns an array with locale objects, these objects represents the languages the content objects are allowed to be translated into.

The setting ContentSettings/TranslationList in site.ini determines the array.

Returns
  eZLocale[]

Definition at line 5404 of file ezcontentobject.php.

References eZContentLanguage\fetchList().

Referenced by eZContentObjectPackageCreator\initializeObjectLimits(), eZContentObjectPackageCreator\loadObjectLimits(), and eZContentObjectVersion\nonTranslationList().

## ◆ translationStringList()

static eZContentObject::translationStringList | ( |  | ) |
| static

Returns an array with locale strings, these strings represents the languages which content objects are allowed to be translated into.

The setting ContentSettings/TranslationList in site.ini determines the array.

Returns
  string[]

Definition at line 5383 of file ezcontentobject.php.

References eZContentLanguage\fetchList().

## ◆ validateInput()

eZContentObject::validateInput | ( |  | $contentObjectAttributes,
|  |  | $attributeDataBaseName,
|  |  | $inputParameters = `false`,
|  |  | $parameters = `array()`
| ) |  |

Parameters

  eZContentObjectAttribute[] | $contentObjectAttributes |
  string | $attributeDataBaseName |
  array | bool | $inputParameters |
  array | $parameters |

Returns
  array

Definition at line 2437 of file ezcontentobject.php.

References commitInputRelations(), initialLanguageCode(), eZHTTPTool\instance(), resetInputRelationList(), eZInputValidator\STATE_ACCEPTED, eZInputValidator\STATE_INTERMEDIATE, and eZInputValidator\STATE_INVALID.

## ◆ version()

eZContentObject::version | ( |  | $version,
|  |  | $asObject = `true`
| ) |  |

Returns the given object version. False is returned if the versions does not exist.

Parameters

  int | $version |
  bool | $asObject | If true, returns an eZContentObjectVersion; if false, returns an array

Returns
  eZContentObjectVersion|array|bool

Definition at line 1310 of file ezcontentobject.php.

References $ID, and eZContentObjectVersion\fetchVersion().

Referenced by createNewVersion(), and serialize().

## ◆ versionLanguageName()

eZContentObject::versionLanguageName | ( |  | $version,
|  |  | $lang = `false`
| ) |  |

Returns the object name for version $version in the language $lang

Parameters

  int | $version |
  string | bool | $lang | If omitted, the initial language of the object is used

Returns
  string|bool

Definition at line 388 of file ezcontentobject.php.

References eZPersistentObject\attribute(), eZPersistentObject\count(), eZContentLanguage\fetch(), eZDB\instance(), and eZDebug\writeNotice().

Referenced by name().

## ◆ versions()

eZContentObject::versions | ( |  | $asObject = `true`,
|  |  | $parameters = `array()`
| ) |  |

Returns an array of eZContentObjectVersion for the current object according to the conditions in $parameters.

Parameters

  bool | $asObject | If true, returns an eZContentObjectVersion; if false, returns an array
  array | $parameters |

Returns
  eZContentObjectVersion[]|array

Definition at line 1342 of file ezcontentobject.php.

References eZContentObjectVersion\definition(), eZPersistentObject\fetchObjectList(), and eZContentLanguage\idByLocale().

Referenced by cleanupInternalDrafts(), copy(), createNewVersion(), hasRemainingVersions(), postUnserialize(), publishedVersion(), removeTranslation(), and serialize().

## ◆ visibleNodes()

eZContentObject::visibleNodes | ( |  | ) |

Returns the visible nodes of the current object. The main node is the first element in the returned value (if it is considered visible).

The setting site.ini/[SiteAccessSettings]/ShowHiddenNodes is taken into account, ie an hidden (or hidden by superior) node is considered visible if ShowHiddenNodes is true.

See also
  eZContentObject::assignedNodes

Returns
  eZContentObjectTreeNode[]

Definition at line 3867 of file ezcontentobject.php.

References assignedNodes().

## Member Data Documentation

## ◆ $ClassIdentifier

eZContentObject::$ClassIdentifier

Definition at line 6727 of file ezcontentobject.php.

Referenced by contentClassIdentifier().

## ◆ $ClassName

eZContentObject::$ClassName

Definition at line 6722 of file ezcontentobject.php.

Referenced by className().

## ◆ $ContentActionList

eZContentObject::$ContentActionList = false

Definition at line 6737 of file ezcontentobject.php.

Referenced by contentActionList().

## ◆ $ContentObject

eZContentObject::$ContentObject

Definition at line 6755 of file ezcontentobject.php.

## ◆ $ContentObjectAttributeArray

eZContentObject::$ContentObjectAttributeArray

Definition at line 18 of file ezcontentobject.php.

## ◆ $ContentObjectAttributes

eZContentObject::$ContentObjectAttributes = array()

Definition at line 6742 of file ezcontentobject.php.

## ◆ $CurrentLanguage

eZContentObject::$CurrentLanguage

Definition at line 6717 of file ezcontentobject.php.

Referenced by contentObjectAttributes(), currentLanguage(), fetchDataMap(), and name().

## ◆ $DataMap

eZContentObject::$DataMap = array()

Definition at line 6732 of file ezcontentobject.php.

Referenced by resetDataMap().

## ◆ $ID

eZContentObject::$ID

Definition at line 6707 of file ezcontentobject.php.

Referenced by addContentObjectRelation(), assignDefaultStates(), assignState(), copyContentObjectRelations(), fetchDataMap(), fetchInput(), purge(), relatedObjectCount(), relatedObjects(), removeContentObjectRelation(), removeThis(), removeTranslation(), stateIDArray(), and version().

## ◆ $InputRelationList

eZContentObject::$InputRelationList = array()

Definition at line 6752 of file ezcontentobject.php.

## ◆ $MainNodeID

eZContentObject::$MainNodeID = false

Definition at line 6747 of file ezcontentobject.php.

Referenced by mainNodeID().

## ◆ $Name

eZContentObject::$Name

Definition at line 6712 of file ezcontentobject.php.

Referenced by name().

## ◆ $Permissions

eZContentObject::$Permissions

Definition at line 6754 of file ezcontentobject.php.

Referenced by permissions().

## ◆ $StateIDArray

eZContentObject::$StateIDArray = false
| private

Definition at line 6763 of file ezcontentobject.php.

Referenced by stateIDArray().

## ◆ PACKAGE_DELETE

const eZContentObject::PACKAGE_DELETE = 4

Definition at line 34 of file ezcontentobject.php.

Referenced by eZContentObjectPackageHandler\uninstall().

## ◆ PACKAGE_ERROR_EXISTS

const eZContentObject::PACKAGE_ERROR_EXISTS = 2

Definition at line 24 of file ezcontentobject.php.

Referenced by eZContentObjectTreeNode\unserialize().

## ◆ PACKAGE_ERROR_HAS_CHILDREN

const eZContentObject::PACKAGE_ERROR_HAS_CHILDREN = 102

Definition at line 27 of file ezcontentobject.php.

Referenced by eZContentObjectPackageHandler\uninstall().

## ◆ PACKAGE_ERROR_MODIFIED

const eZContentObject::PACKAGE_ERROR_MODIFIED = 101

Definition at line 26 of file ezcontentobject.php.

Referenced by eZContentObjectPackageHandler\uninstall().

## ◆ PACKAGE_ERROR_NO_CLASS

const eZContentObject::PACKAGE_ERROR_NO_CLASS = 1

Definition at line 23 of file ezcontentobject.php.

## ◆ PACKAGE_ERROR_NODE_EXISTS

const eZContentObject::PACKAGE_ERROR_NODE_EXISTS = 3

Definition at line 25 of file ezcontentobject.php.

Referenced by eZContentObjectTreeNode\unserialize().

## ◆ PACKAGE_KEEP

const eZContentObject::PACKAGE_KEEP = 5

Definition at line 35 of file ezcontentobject.php.

Referenced by eZContentObjectPackageHandler\uninstall().

## ◆ PACKAGE_NEW

const eZContentObject::PACKAGE_NEW = 3

Definition at line 31 of file ezcontentobject.php.

Referenced by eZContentObjectTreeNode\unserialize().

## ◆ PACKAGE_REPLACE

const eZContentObject::PACKAGE_REPLACE = 1

Definition at line 29 of file ezcontentobject.php.

## ◆ PACKAGE_SKIP

const eZContentObject::PACKAGE_SKIP = 2

Definition at line 30 of file ezcontentobject.php.

## ◆ PACKAGE_UPDATE

const eZContentObject::PACKAGE_UPDATE = 6

Definition at line 32 of file ezcontentobject.php.

Referenced by eZContentObjectTreeNode\unserialize().

## ◆ RELATION_ATTRIBUTE

const eZContentObject::RELATION_ATTRIBUTE = 8

Definition at line 40 of file ezcontentobject.php.

Referenced by addContentObjectRelation(), eZContentCacheManager\appendRelatingNodeIDs(), relatedObjectCount(), relatedObjects(), relationTypeMask(), eZObjectRelationType\removeContentObjectRelation(), and removeContentObjectRelation().

## ◆ RELATION_COMMON

const eZContentObject::RELATION_COMMON = 1

Definition at line 37 of file ezcontentobject.php.

Referenced by addContentObjectRelation(), eZContentCacheManager\appendRelatingNodeIDs(), relationTypeMask(), and eZContentObjectVersion\serialize().

## ◆ RELATION_EMBED

const eZContentObject::RELATION_EMBED = 2

Definition at line 38 of file ezcontentobject.php.

Referenced by addContentObjectRelation(), eZContentCacheManager\appendRelatingNodeIDs(), embeddedContentObjectCount(), embeddedContentObjectList(), eZXMLTextType\onPublish(), relationTypeMask(), resetInputRelationList(), reverseEmbeddedObjectCount(), reverseEmbeddedObjectList(), eZXMLTextType\transformRemoteLinksToLinks(), and eZSimplifiedXMLInput\validateInput().

## ◆ RELATION_LINK

const eZContentObject::RELATION_LINK = 4

Definition at line 39 of file ezcontentobject.php.

Referenced by addContentObjectRelation(), eZContentCacheManager\appendRelatingNodeIDs(), linkedContentObjectCount(), linkedContentObjectList(), eZXMLTextType\onPublish(), relationTypeMask(), resetInputRelationList(), reverseLinkedObjectCount(), reverseLinkedObjectList(), eZXMLTextType\transformRemoteLinksToLinks(), and eZSimplifiedXMLInput\validateInput().

## ◆ STATUS_ARCHIVED

const eZContentObject::STATUS_ARCHIVED = 2

Definition at line 21 of file ezcontentobject.php.

Referenced by eZObjectRelationListType\initializeObjectAttribute(), and removeThis().

## ◆ STATUS_DRAFT

const eZContentObject::STATUS_DRAFT = 0

Definition at line 19 of file ezcontentobject.php.

Referenced by copy(), and eZContentObjectVersion\tempMainNode().

## ◆ STATUS_PUBLISHED

const eZContentObject::STATUS_PUBLISHED = 1

Definition at line 20 of file ezcontentobject.php.

Referenced by eZUser\_loginUser(), eZMultiplexerType\attribute(), eZUser\fetchContentList(), eZXHTMLXMLOutput\initHandlerEmbed(), eZLDAPUser\loginUser(), eZTextFileUser\loginUser(), eZContentClass\objectCount(), eZObjectRelationListType\onPublish(), relatedObjectCount(), relatedObjects(), and eZContentObjectVersion\tempMainNode().

The documentation for this class was generated from the following file:

- ezcontentobject.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.