Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Member Functions | List of all members
eZContentObjectVersion Class Reference

The class eZContentObjectVersion handles different versions of an content object. More...

Inheritance diagram for eZContentObjectVersion:

## Public Member Functions
| __construct ( $row=array())
| tempMainNode ()
| name ( $lang=false)
| versionName ( $lang=false)
| canVersionRead ()
| canVersionRemove ()
| checkAccess ( $functionName, $originalClassID=false, $parentClassID=false, $returnAccessList=false, $language=false)
| contentObject ()
| mainParentNodeID ()
| parentNodes ()
| nodeAssignments ()
| assignToNode ( $nodeID, $main=0, $fromNodeID=0, $sortField=null, $sortOrder=null, $remoteID=0, $parentRemoteId=null)
| removeAssignment ( $nodeID)
| dataMap ()
| resetDataMap ()
| relatedContentObjectArray ()
| reverseRelatedObjectList ()
| removeTranslation ( $languageCode)
| cloneVersion ( $newVersionNumber, $userID, $contentObjectID=false, $status=eZContentObjectVersion::STATUS_DRAFT)
| translations ( $asObject=true)
| translation ( $asObject=true)
| translationList ( $language=false, $asObject=true)
| defaultTranslationList ()
| contentObjectAttributes ( $languageCode=false, $asObject=true)
| postUnserialize ( $package)
| serialize ( $package, $options=false, $contentNodeIDArray=false, $topNodeIDArray=false)
| creator ()
| unpublish ()
| nonTranslationList ()
| languageMask ()
| updateLanguageMask ( $mask=false, $forceStore=true)
| initialLanguage ()
| initialLanguageCode ()
| nonTranslatableAttributesToUpdate ()
| setAlwaysAvailableLanguageID ( $languageID)
| clearAlwaysAvailableLanguageID ()
| hasConflicts ( $editLanguage=false)
| store ( $fieldFilters=null)
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 | statusList ( $limit=false)
static | fetch ( $id, $asObject=true)
static | fetchVersion ( $version, $contentObjectID, $asObject=true)
static | fetchVersionForUpdate ( $version, $contentObjectID, $asObject=true)
static | fetchUserDraft ( $objectID, $userID)
static | fetchLatestUserDraft ( $objectID, $userID, $languageID, $modified=0)
static | fetchForUser ( $userID, $status=eZContentObjectVersion::STATUS_DRAFT)
static | fetchFiltered ( $filters, $offset, $limit)
static | create ( $contentobjectID, $userID=false, $version=1, $initialLanguageCode=false)
static | removeVersions ( $versionStatus=false, $limit=false, $expiryTime=false, $fetchPortionSize=50)
static | fetchAttributes ( $version, $contentObjectID, $language=false, $asObject=true)
static | unserialize ( $domNode, $contentObject, $ownerID, $sectionID, $activeVersion, $firstVersion, &$nodeList, &$options, $package, $handlerType='ezcontentobject', $firstVersioninitialLanguage=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
| $DataMap
| $TempNode
| $VersionName
| $VersionNameCache
| $Permissions
| $ContentObject
| $Version
| $CreatorID
const | STATUS_DRAFT = 0
const | STATUS_PUBLISHED = 1
const | STATUS_PENDING = 2
const | STATUS_ARCHIVED = 3
const | STATUS_REJECTED = 4
const | STATUS_INTERNAL_DRAFT = 5
const | STATUS_REPEAT = 6
const | STATUS_QUEUED = 7
| $CurrentLanguage = false
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

## Static Private Member Functions
static | mapLanguage ( $language, $options)

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

## Detailed Description

The class eZContentObjectVersion handles different versions of an content object.

Definition at line 18 of file ezcontentobjectversion.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZContentObjectVersion::__construct | ( |  | $row = `array()` | ) |

Initializes the object with the $row.

It will try to set each field taken from the database row. Calls fill to do the job. 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 39 of file ezcontentobjectversion.php.

## Member Function Documentation

## ◆ assignToNode()

eZContentObjectVersion::assignToNode | ( |  | $nodeID,
|  |  | $main = `0`,
|  |  | $fromNodeID = `0`,
|  |  | $sortField = `null`,
|  |  | $sortOrder = `null`,
|  |  | $remoteID = `0`,
|  |  | $parentRemoteId = `null`
| ) |  |

Parameters

  int | $nodeID |
  int | $main |
  int | $fromNodeID |
  null | int | $sortField |
  null | int | $sortOrder |
  int | string | $remoteID | remote id of the node assignment
  null | string | $parentRemoteId | remote id of the assigned tree node (not the parent tree node!)

Returns
  eZNodeAssignment|null

Definition at line 847 of file ezcontentobjectversion.php.

References eZPersistentObject\attribute(), eZNodeAssignment\create(), eZContentObjectTreeNode\SORT_ORDER_ASC, eZContentObjectTreeNode\SORT_ORDER_DESC, STATUS_DRAFT, and STATUS_INTERNAL_DRAFT.

## ◆ canVersionRead()

eZContentObjectVersion::canVersionRead | ( |  | ) |

Returns
  `true` if the current user can read this version of the object.

Definition at line 414 of file ezcontentobjectversion.php.

References checkAccess().

## ◆ canVersionRemove()

eZContentObjectVersion::canVersionRemove | ( |  | ) |

Returns
  `true` if the current user can remove this version of the object.

Definition at line 426 of file ezcontentobjectversion.php.

References checkAccess().

## ◆ checkAccess()

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

Definition at line 435 of file ezcontentobjectversion.php.

References eZPersistentObject\attribute(), eZPersistentObject\count(), eZUser\currentUser(), eZContentObjectTreeNode\fetch(), eZNodeAssignment\fetchForObject(), eZContentLanguage\idByLocale(), eZContentLanguage\maskByLocale(), STATUS_DRAFT, STATUS_INTERNAL_DRAFT, STATUS_PENDING, STATUS_PUBLISHED, and eZDebug\writeError().

Referenced by canVersionRead(), and canVersionRemove().

## ◆ clearAlwaysAvailableLanguageID()

eZContentObjectVersion::clearAlwaysAvailableLanguageID | ( |  | ) |

Definition at line 1825 of file ezcontentobjectversion.php.

References setAlwaysAvailableLanguageID().

## ◆ cloneVersion()

eZContentObjectVersion::cloneVersion | ( |  | $newVersionNumber,
|  |  | $userID,
|  |  | $contentObjectID = `false`,
|  |  | $status = `eZContentObjectVersion::STATUS_DRAFT`
| ) |  |

Clones the version with new version $newVersionNumber and creator $userID

Note
  The cloned version is not stored.

Definition at line 1143 of file ezcontentobjectversion.php.

## ◆ contentObject()

eZContentObjectVersion::contentObject | ( |  | ) |

Definition at line 798 of file ezcontentobjectversion.php.

References $ContentObject, eZPersistentObject\attribute(), and eZContentObject\fetch().

Referenced by hasConflicts(), name(), nonTranslatableAttributesToUpdate(), and tempMainNode().

## ◆ contentObjectAttributes()

eZContentObjectVersion::contentObjectAttributes | ( |  | $languageCode = `false`,
|  |  | $asObject = `true`
| ) |  |

Returns the attributes for the current content object version. If $language is not specified it will use the initial language of the version.

Definition at line 1235 of file ezcontentobjectversion.php.

References $CurrentLanguage, fetchAttributes(), initialLanguageCode(), STATUS_DRAFT, STATUS_INTERNAL_DRAFT, and STATUS_PENDING.

Referenced by dataMap(), postUnserialize(), removeTranslation(), and serialize().

## ◆ create()

static eZContentObjectVersion::create | ( |  | $contentobjectID,
|  |  | $userID = `false`,
|  |  | $version = `1`,
|  |  | $initialLanguageCode = `false`
| ) |  |
| static

Definition at line 937 of file ezcontentobjectversion.php.

References eZUser\currentUser(), eZContentObject\defaultLanguage(), and eZContentLanguage\idByLocale().

Referenced by eZContentObject\createInitialVersion(), and eZContentClass\instantiate().

## ◆ creator()

eZContentObjectVersion::creator | ( |  | ) |

Returns
  the creator of the current version.

Definition at line 1655 of file ezcontentobjectversion.php.

References eZContentObject\fetch().

## ◆ dataMap()

eZContentObjectVersion::dataMap | ( |  | ) |

Returns
  the content object attribute

Definition at line 892 of file ezcontentobjectversion.php.

References $ContentObjectAttributeArray, $DataMap, and contentObjectAttributes().

## ◆ defaultTranslationList()

eZContentObjectVersion::defaultTranslationList | ( |  | ) |

Returns
  An array with all translations except default language for the this version.

Note
  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 1226 of file ezcontentobjectversion.php.

References translationList().

## ◆ definition()

static eZContentObjectVersion::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 49 of file ezcontentobjectversion.php.

Referenced by fetch(), fetchFiltered(), fetchForUser(), fetchLatestUserDraft(), fetchUserDraft(), fetchVersion(), and eZContentObject\versions().

## ◆ fetch()

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

Returns
  true if the requested attribute exists in object.

Definition at line 158 of file ezcontentobjectversion.php.

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

## ◆ fetchAttributes()

static eZContentObjectVersion::fetchAttributes | ( |  | $version,
|  |  | $contentObjectID,
|  |  | $language = `false`,
|  |  | $asObject = `true`
| ) |  |
| static

Returns the attributes for the content object version $version and content object $contentObjectID. $language defines the language to fetch.

See also
  attributes

Note
  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 1260 of file ezcontentobjectversion.php.

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

Referenced by contentObjectAttributes(), and eZContentObjectTranslation\objectAttributes().

## ◆ fetchFiltered()

static eZContentObjectVersion::fetchFiltered | ( |  | $filters,
|  |  | $offset,
|  |  | $limit
| ) |  |
| static

Definition at line 291 of file ezcontentobjectversion.php.

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

Referenced by removeVersions().

## ◆ fetchForUser()

static eZContentObjectVersion::fetchForUser | ( |  | $userID,
|  |  | $status = `eZContentObjectVersion::STATUS_DRAFT`
| ) |  |
| static

Definition at line 281 of file ezcontentobjectversion.php.

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

Referenced by eZContentObject\cleanupAllInternalDrafts().

## ◆ fetchLatestUserDraft()

static eZContentObjectVersion::fetchLatestUserDraft | ( |  | $objectID,
|  |  | $userID,
|  |  | $languageID,
|  |  | $modified = `0`
| ) |  |
| static

Fetch the latest draft by user id

Since
  4.7

Parameters

  int | $objectID |
  int | $userID |
  int | $languageID |
  int | $modified |

Returns
  eZContentObjectVersion|null

Definition at line 254 of file ezcontentobjectversion.php.

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

Referenced by eZContentObjectTreeNode\dataMap().

## ◆ fetchUserDraft()

static eZContentObjectVersion::fetchUserDraft | ( |  | $objectID,
|  |  | $userID
| ) |  |
| static

Definition at line 230 of file ezcontentobjectversion.php.

References eZPersistentObject\count(), definition(), eZPersistentObject\fetchObjectList(), STATUS_DRAFT, and STATUS_INTERNAL_DRAFT.

## ◆ fetchVersion()

static eZContentObjectVersion::fetchVersion | ( |  | $version,
|  |  | $contentObjectID,
|  |  | $asObject = `true`
| ) |  |
| static

Definition at line 166 of file ezcontentobjectversion.php.

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

Referenced by eZApproveCollaborationHandler\contentObjectVersion(), eZContentObjectTreeNode\contentObjectVersionObject(), eZContentObject\currentVersion(), eZPublishType\eventContent(), eZImageAliasHandler\initializeFromFile(), eZImageAliasHandler\initializeFromHTTPFile(), eZContentObjectPackageHandler\installSuspendedObjectRelations(), eZContentObjectAttribute\objectVersion(), eZObjectRelationListType\onPublish(), eZObjectRelationListType\removeRelationObject(), and eZContentObject\version().

## ◆ fetchVersionForUpdate()

static eZContentObjectVersion::fetchVersionForUpdate | ( |  | $version,
|  |  | $contentObjectID,
|  |  | $asObject = `true`
| ) |  |
| static

Definition at line 177 of file ezcontentobjectversion.php.

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

## ◆ hasConflicts()

eZContentObjectVersion::hasConflicts | ( |  | $editLanguage = `false` | ) |

Definition at line 1835 of file ezcontentobjectversion.php.

References contentObject(), eZPersistentObject\count(), initialLanguageCode(), STATUS_ARCHIVED, and STATUS_PUBLISHED.

## ◆ initialLanguage()

eZContentObjectVersion::initialLanguage | ( |  | ) |

Definition at line 1746 of file ezcontentobjectversion.php.

References eZContentLanguage\fetch().

Referenced by initialLanguageCode().

## ◆ initialLanguageCode()

eZContentObjectVersion::initialLanguageCode | ( |  | ) |

Definition at line 1751 of file ezcontentobjectversion.php.

References initialLanguage().

Referenced by contentObjectAttributes(), hasConflicts(), serialize(), and versionName().

## ◆ languageMask()

eZContentObjectVersion::languageMask | ( |  | ) |

Definition at line 1726 of file ezcontentobjectversion.php.

References eZPersistentObject\attribute().

## ◆ mainParentNodeID()

eZContentObjectVersion::mainParentNodeID | ( |  | ) |

Definition at line 807 of file ezcontentobjectversion.php.

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

## ◆ mapLanguage()

static eZContentObjectVersion::mapLanguage | ( |  | $language,
|  |  | $options
| ) |  |
| static private

Maps input lange to another one if defined in $options['language_map']. If it cannot map it returns the original language.

Returns
  string

Definition at line 1311 of file ezcontentobjectversion.php.

Referenced by unserialize().

## ◆ name()

eZContentObjectVersion::name | ( |  | $lang = `false` | ) |

Returns
  the name of the current version, optionally in the specific language $lang

Definition at line 353 of file ezcontentobjectversion.php.

References $VersionName, eZPersistentObject\attribute(), and contentObject().

## ◆ nodeAssignments()

eZContentObjectVersion::nodeAssignments | ( |  | ) |

Definition at line 831 of file ezcontentobjectversion.php.

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

Referenced by tempMainNode().

## ◆ nonTranslatableAttributesToUpdate()

eZContentObjectVersion::nonTranslatableAttributesToUpdate | ( |  | ) |

Definition at line 1760 of file ezcontentobjectversion.php.

References eZPersistentObject\attribute(), contentObject(), eZContentObjectAttribute\fetch(), eZDB\instance(), STATUS_DRAFT, STATUS_INTERNAL_DRAFT, and STATUS_PENDING.

## ◆ nonTranslationList()

eZContentObjectVersion::nonTranslationList | ( |  | ) |

Returns
  an array with locale objects, these objects represents the languages the content objects are allowed to be translated into. The array will not include locales that has been translated in this version.

Definition at line 1706 of file ezcontentobjectversion.php.

References eZContentObject\translationList(), and translations().

## ◆ parentNodes()

eZContentObjectVersion::parentNodes | ( |  | ) |

Definition at line 820 of file ezcontentobjectversion.php.

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

## ◆ postUnserialize()

eZContentObjectVersion::postUnserialize | ( |  | $package | ) |

Definition at line 1518 of file ezcontentobjectversion.php.

References contentObjectAttributes(), and translations().

## ◆ relatedContentObjectArray()

eZContentObjectVersion::relatedContentObjectArray | ( |  | ) |

Returns the related objects.

Definition at line 931 of file ezcontentobjectversion.php.

References eZPersistentObject\attribute().

## ◆ removeAssignment()

eZContentObjectVersion::removeAssignment | ( |  | $nodeID | ) |

Note
  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 873 of file ezcontentobjectversion.php.

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

## ◆ removeTranslation()

eZContentObjectVersion::removeTranslation | ( |  | $languageCode | ) |

Note
  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 1050 of file ezcontentobjectversion.php.

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

## ◆ removeVersions()

static eZContentObjectVersion::removeVersions | ( |  | $versionStatus = `false`,
|  |  | $limit = `false`,
|  |  | $expiryTime = `false`,
|  |  | $fetchPortionSize = `50`
| ) |  |
| static

Will remove all version that match the status set in $versionStatus.

Parameters

  $versionStatus | can either be a single value or an array with values, if `false` the function will remove all status except published.
  $limit | limits count of versions which should be removed.
  $expiryTime | if not false then method will remove only versions which have modified time less than specified expiry time.
  $fetchPortionSize | portion size for single fetch() call to avoid memory overflow erros (default 50).

Note
  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 1079 of file ezcontentobjectversion.php.

References eZPersistentObject\count(), fetchFiltered(), eZDB\instance(), STATUS_ARCHIVED, STATUS_DRAFT, STATUS_INTERNAL_DRAFT, STATUS_PENDING, STATUS_REJECTED, and eZDebug\writeError().

Referenced by eZContentObject\removeVersions().

## ◆ resetDataMap()

eZContentObjectVersion::resetDataMap | ( |  | ) |

Definition at line 921 of file ezcontentobjectversion.php.

References $DataMap.

## ◆ reverseRelatedObjectList()

eZContentObjectVersion::reverseRelatedObjectList | ( |  | ) |

Definition at line 964 of file ezcontentobjectversion.php.

References eZPersistentObject\attribute().

## ◆ serialize()

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

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

Parameters

  package |
  options | package options ( optional )
  contentNodeIDArray | array of allowed nodes ( optional )
  topNodeIDArray | array of top nodes in current package export (optional )

Note
  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 1539 of file ezcontentobjectversion.php.

References eZPersistentObject\attribute(), contentObjectAttributes(), eZPersistentObject\count(), eZContentObjectTreeNode\fetchByContentObjectID(), initialLanguageCode(), eZDB\instance(), eZContentObject\RELATION_COMMON, eZDateUtils\rfc1123Date(), translationList(), and eZDebug\writeWarning().

## ◆ setAlwaysAvailableLanguageID()

eZContentObjectVersion::setAlwaysAvailableLanguageID | ( |  | $languageID | ) |

Definition at line 1791 of file ezcontentobjectversion.php.

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

Referenced by clearAlwaysAvailableLanguageID().

## ◆ statusList()

static eZContentObjectVersion::statusList | ( |  | $limit = `false` | ) |
| static

Definition at line 135 of file ezcontentobjectversion.php.

References STATUS_ARCHIVED, STATUS_DRAFT, STATUS_PENDING, STATUS_PUBLISHED, and STATUS_REJECTED.

## ◆ store()

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

Stores the object in the database, uses storeObject() to do the actual job and passes $fieldFilters to it.

Note: 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 | null | $fieldFilters |

Returns
  void

Reimplemented from eZPersistentObject.

Definition at line 1862 of file ezcontentobjectversion.php.

References eZPersistentObject\attribute(), and eZContentObject\clearCache().

Referenced by updateLanguageMask().

## ◆ tempMainNode()

eZContentObjectVersion::tempMainNode | ( |  | ) |

Returns
  an eZContentObjectTreeNode object which doesn't really exist in the DB, this can be passed to a node view template.

Definition at line 307 of file ezcontentobjectversion.php.

References $TempNode, contentObject(), eZPersistentObject\count(), eZContentObjectTreeNode\create(), nodeAssignments(), eZContentObject\STATUS_DRAFT, and eZContentObject\STATUS_PUBLISHED.

## ◆ translation()

eZContentObjectVersion::translation | ( |  | $asObject = `true` | ) |

Returns
  An array with all the translations for the current version.

Deprecated:

Definition at line 1171 of file ezcontentobjectversion.php.

## ◆ translationList()

eZContentObjectVersion::translationList | ( |  | $language = `false`,
|  |  | $asObject = `true`
| ) |  |

Returns
  An array with all the translations for the current version.

Note
  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 1182 of file ezcontentobjectversion.php.

References eZDB\instance().

Referenced by defaultTranslationList(), serialize(), translations(), and updateLanguageMask().

## ◆ translations()

eZContentObjectVersion::translations | ( |  | $asObject = `true` | ) |

Returns
  An array with all the translations for the current version.

Definition at line 1162 of file ezcontentobjectversion.php.

References translationList().

Referenced by nonTranslationList(), and postUnserialize().

## ◆ unpublish()

eZContentObjectVersion::unpublish | ( |  | ) |

Note
  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 1668 of file ezcontentobjectversion.php.

References eZPersistentObject\attribute(), eZPersistentObject\count(), eZDB\instance(), eZPersistentObject\setAttribute(), STATUS_ARCHIVED, STATUS_PUBLISHED, and eZDebug\writeWarning().

## ◆ unserialize()

static eZContentObjectVersion::unserialize | ( |  | $domNode,
|  |  | $contentObject,
|  |  | $ownerID,
|  |  | $sectionID,
|  |  | $activeVersion,
|  |  | $firstVersion,
|  | & | $nodeList,
|  | & | $options,
|  |  | $package,
|  |  | $handlerType = `'ezcontentobject'`,
|  |  | $firstVersioninitialLanguage = `false`
| ) |  |
| static

Unserialize xml structure. Create object from xml input.

Parameters

  domNode | XML DOM Node
  contentObject | contentobject
  ownerID | owner ID
  sectionID | section ID
  activeVersion | new object, true if first version of new object
  firstVersion | If true, unserialize to version 1, otherwise create new version
  nodeList |
  options |
  package |
  handlerType |
  firstVersioninitialLanguage | Locale string (e.g. "eng-GB") of the initial language to use if unserializing to version 1.

Returns
  created object, false if could not create object/xml invalid

Note
  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 1340 of file ezcontentobjectversion.php.

References eZContentLanguage\addLanguage(), eZPersistentObject\count(), eZContentLanguage\fetchByLocale(), eZContentObject\fetchByRemoteID(), eZDB\instance(), eZLocale\instance(), mapLanguage(), eZContentLanguage\prioritizedLanguages(), STATUS_DRAFT, eZDateUtils\textToDate(), and eZContentObjectTreeNode\unserialize().

## ◆ updateLanguageMask()

eZContentObjectVersion::updateLanguageMask | ( |  | $mask = `false`,
|  |  | $forceStore = `true`
| ) |  |

Definition at line 1731 of file ezcontentobjectversion.php.

References eZContentLanguage\maskByLocale(), eZPersistentObject\setAttribute(), store(), and translationList().

Referenced by removeTranslation().

## ◆ versionName()

eZContentObjectVersion::versionName | ( |  | $lang = `false` | ) |

Returns
  the name of the current version, optionally in the specific language $lang

Definition at line 381 of file ezcontentobjectversion.php.

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

## Member Data Documentation

## ◆ $ContentObject

eZContentObjectVersion::$ContentObject

Definition at line 26 of file ezcontentobjectversion.php.

Referenced by contentObject().

## ◆ $ContentObjectAttributeArray

eZContentObjectVersion::$ContentObjectAttributeArray

Definition at line 20 of file ezcontentobjectversion.php.

Referenced by dataMap().

## ◆ $CreatorID

eZContentObjectVersion::$CreatorID

Definition at line 28 of file ezcontentobjectversion.php.

## ◆ $CurrentLanguage

eZContentObjectVersion::$CurrentLanguage = false

Definition at line 1868 of file ezcontentobjectversion.php.

Referenced by contentObjectAttributes().

## ◆ $DataMap

eZContentObjectVersion::$DataMap

Definition at line 21 of file ezcontentobjectversion.php.

Referenced by dataMap(), and resetDataMap().

## ◆ $Permissions

eZContentObjectVersion::$Permissions

Definition at line 25 of file ezcontentobjectversion.php.

## ◆ $TempNode

eZContentObjectVersion::$TempNode

Definition at line 22 of file ezcontentobjectversion.php.

Referenced by tempMainNode().

## ◆ $Version

eZContentObjectVersion::$Version

Definition at line 27 of file ezcontentobjectversion.php.

## ◆ $VersionName

eZContentObjectVersion::$VersionName

Definition at line 23 of file ezcontentobjectversion.php.

Referenced by name().

## ◆ $VersionNameCache

eZContentObjectVersion::$VersionNameCache

Definition at line 24 of file ezcontentobjectversion.php.

## ◆ STATUS_ARCHIVED

const eZContentObjectVersion::STATUS_ARCHIVED = 3

Definition at line 32 of file ezcontentobjectversion.php.

Referenced by eZContentObject\createNewVersion(), hasConflicts(), eZObjectRelationListType\onPublish(), removeVersions(), statusList(), and unpublish().

## ◆ STATUS_DRAFT

const eZContentObjectVersion::STATUS_DRAFT = 0

Definition at line 29 of file ezcontentobjectversion.php.

Referenced by assignToNode(), checkAccess(), eZApproveType\checkApproveCollaboration(), contentObjectAttributes(), eZContentObject\copyVersion(), eZContentFunctions\createAndPublishObject(), fetchLatestUserDraft(), fetchUserDraft(), eZTextFileUser\loginUser(), nonTranslatableAttributesToUpdate(), eZLDAPUser\publishNewUserGroup(), eZLDAPUser\publishUpdateUser(), removeVersions(), statusList(), and unserialize().

## ◆ STATUS_INTERNAL_DRAFT

const eZContentObjectVersion::STATUS_INTERNAL_DRAFT = 5

Definition at line 34 of file ezcontentobjectversion.php.

Referenced by assignToNode(), checkAccess(), eZContentObject\cleanupAllInternalDrafts(), eZContentObject\cleanupInternalDrafts(), contentObjectAttributes(), eZContentObject\createWithNodeAssignment(), fetchLatestUserDraft(), fetchUserDraft(), nonTranslatableAttributesToUpdate(), and removeVersions().

## ◆ STATUS_PENDING

const eZContentObjectVersion::STATUS_PENDING = 2

Definition at line 31 of file ezcontentobjectversion.php.

Referenced by checkAccess(), contentObjectAttributes(), nonTranslatableAttributesToUpdate(), eZContentObjectTreeNode\removeSubtrees(), removeVersions(), and statusList().

## ◆ STATUS_PUBLISHED

const eZContentObjectVersion::STATUS_PUBLISHED = 1

Definition at line 30 of file ezcontentobjectversion.php.

Referenced by checkAccess(), eZContentObject\copyVersion(), eZURL\handleList(), hasConflicts(), eZImageAliasHandler\imagePath(), eZObjectRelationListType\onPublish(), eZContentObject\publishedVersion(), statusList(), and unpublish().

## ◆ STATUS_QUEUED

const eZContentObjectVersion::STATUS_QUEUED = 7

Definition at line 37 of file ezcontentobjectversion.php.

## ◆ STATUS_REJECTED

const eZContentObjectVersion::STATUS_REJECTED = 4

Definition at line 33 of file ezcontentobjectversion.php.

Referenced by eZApproveType\checkApproveCollaboration(), removeVersions(), and statusList().

## ◆ STATUS_REPEAT

const eZContentObjectVersion::STATUS_REPEAT = 6

Definition at line 36 of file ezcontentobjectversion.php.

Referenced by eZModuleOperationInfo\executeTrigger().

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

- ezcontentobjectversion.php

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