eZPublish
4.7
|
The class eZContentObjectVersion handles different versions of an content object. More...
Public Member Functions | |
assignToNode ($nodeID, $main=0, $fromNodeID=0, $sortField=null, $sortOrder=null, $remoteID=0) | |
canVersionRead () | |
canVersionRemove () | |
checkAccess ($functionName, $originalClassID=false, $parentClassID=false, $returnAccessList=false, $language=false) | |
clearAlwaysAvailableLanguageID () | |
cloneVersion ($newVersionNumber, $userID, $contentObjectID=false, $status=eZContentObjectVersion::STATUS_DRAFT) | |
contentObject () | |
contentObjectAttributes ($languageCode=false, $asObject=true) | |
creator () | |
dataMap () | |
defaultTranslationList () | |
eZContentObjectVersion ($row=array()) | |
hasConflicts ($editLanguage=false) | |
initialLanguage () | |
initialLanguageCode () | |
languageMask () | |
mainParentNodeID () | |
name ($lang=false) | |
nodeAssignments () | |
nonTranslatableAttributesToUpdate () | |
nonTranslationList () | |
parentNodes () | |
postUnserialize ($package) | |
relatedContentObjectArray () | |
removeAssignment ($nodeID) | |
removeThis () | |
removeTranslation ($languageCode) | |
resetDataMap () | |
reverseRelatedObjectList () | |
serialize ($package, $options=false, $contentNodeIDArray=false, $topNodeIDArray=false) | |
setAlwaysAvailableLanguageID ($languageID) | |
store ($fieldFilters=null) | |
tempMainNode () | |
translation ($asObject=true) | |
translationList ($language=false, $asObject=true) | |
translations ($asObject=true) | |
unpublish () | |
updateLanguageMask ($mask=false, $forceStore=true) | |
versionName ($lang=false) | |
![]() | |
attribute ($attr, $noFunction=false) | |
Returns the attribute data for $attr, this is either returned from the member variables or a member function depending on whether the definition field or function attributes matched. More... | |
attributes () | |
Returns the attributes for this object, taken from the definition fields and function attributes. More... | |
eZPersistentObject ($row) | |
Initializes the object with the $row. More... | |
fill ($row) | |
Tries to fill in the data in the object by using the object definition which is returned by the function definition() and the database row data $row. More... | |
hasAttribute ($attr) | |
Checks if $attr is part of the definition fields or function attributes. More... | |
hasDirtyData () | |
Returns true if the data is considered dirty and needs to be stored. More... | |
remove ($conditions=null, $extraConditions=null) | |
Removes the object from the database, it will use the keys in the object definition to figure out which table row should be removed unless $conditions is defined as an array with fieldnames. More... | |
setAttribute ($attr, $val) | |
Sets the attribute $attr to the value $val. More... | |
setHasDirtyData ($hasDirtyData) | |
Sets whether the object has dirty data or not. More... | |
store ($fieldFilters=null) | |
Stores the object in the database, uses storeObject() to do the actual job and passes $fieldFilters to it. More... | |
sync ($fieldFilters=null) | |
Makes sure data is stored if the data is considered dirty. More... | |
Static Public Member Functions | |
static | create ($contentobjectID, $userID=false, $version=1, $initialLanguageCode=false) |
static | definition () |
static | fetch ($id, $asObject=true) |
static | fetchAttributes ($version, $contentObjectID, $language=false, $asObject=true) |
static | fetchFiltered ($filters, $offset, $limit) |
static | fetchForUser ($userID, $status=eZContentObjectVersion::STATUS_DRAFT) |
static | fetchLatestUserDraft ($objectID, $userID, $languageID, $modified=0) |
Fetch the latest draft by user id. More... | |
static | fetchUserDraft ($objectID, $userID) |
static | fetchVersion ($version, $contentObjectID, $asObject=true) |
static | removeVersions ($versionStatus=false, $limit=false, $expiryTime=false, $fetchPortionSize=50) |
static | statusList ($limit=false) |
static | unserialize ($domNode, $contentObject, $ownerID, $sectionID, $activeVersion, $firstVersion, &$nodeList, &$options, $package, $handlerType= 'ezcontentobject') |
![]() | |
static | conditionText ($conditions) |
Calls conditionTextByRow with an empty row and $conditions. More... | |
static | conditionTextByRow ($conditions, $row) |
Generates an SQL sentence from the conditions $conditions and row data $row. More... | |
static | count ($def, $conds=null, $field=null) |
Fetches the number of rows by using the object definition. More... | |
static | definition () |
Returns the definition for the object, the default implementation is to return an empty array. More... | |
static | escapeArray ($array) |
Escapes strings in an array with the help of eZDBInterface::escapeString(). More... | |
static | fetchObject ($def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null) |
Fetches and returns an object based on the given parameters and returns is either as an object or as an array. More... | |
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) |
Creates an SQL query out of the different parameters and returns an array with the result. More... | |
static | getShortAttributeName ($db, $def, $attrName) |
Returns the short attribute name (alias) if it's defined, given attribute name otherwise. More... | |
static | handleRows ($rows, $class_name, $asObject) |
Creates PHP objects out of the database rows $rows. More... | |
static | newObjectOrder ($def, $orderField, $conditions) |
Returns an order value which can be used for new items in table, for instance placement. More... | |
static | removeObject ($def, $conditions=null, $extraConditions=null) |
Deletes the object from the table defined in $def with conditions $conditions and extra conditions $extraConditions. More... | |
static | reorderObject ($def, $orderField, $conditions, $down=true) |
Moves a row in a database table. More... | |
static | replaceFieldsWithShortNames ($db, $fieldDefs, &$fields) |
For the given array $fields treats its keys (for associative array) or values (for non-associative array) as table fields names and replaces them with short names (aliases) found in $fieldDefs. More... | |
static | storeObject ($obj, $fieldFilters=null) |
Stores the data in $obj to database. More... | |
static | swapRow ($table, $keys, $order_id, $rows, $id1, $id2) |
Sets row id $id2 to have the placement of row id $id1. More... | |
static | updateObjectList ($parameters) |
Updates rows matching the given parameters. More... | |
Public Attributes | |
$CurrentLanguage = false | |
const | STATUS_ARCHIVED = 3 |
const | STATUS_DRAFT = 0 |
const | STATUS_INTERNAL_DRAFT = 5 |
const | STATUS_PENDING = 2 |
const | STATUS_PUBLISHED = 1 |
const | STATUS_QUEUED = 7 |
const | STATUS_REJECTED = 4 |
const | STATUS_REPEAT = 6 |
![]() | |
$PersistentDataDirty | |
Static Private Member Functions | |
static | mapLanguage ($language, $options) |
The class eZContentObjectVersion handles different versions of an content object.
eZContentObjectVersion::assignToNode | ( | $nodeID, | |
$main = 0 , |
|||
$fromNodeID = 0 , |
|||
$sortField = null , |
|||
$sortOrder = null , |
|||
$remoteID = 0 |
|||
) |
eZContentObjectVersion::canVersionRead | ( | ) |
true
if the current user can read this version of the object. eZContentObjectVersion::canVersionRemove | ( | ) |
true
if the current user can remove this version of the object. eZContentObjectVersion::checkAccess | ( | $functionName, | |
$originalClassID = false , |
|||
$parentClassID = false , |
|||
$returnAccessList = false , |
|||
$language = false |
|||
) |
Referenced by canVersionRead(), and canVersionRemove().
eZContentObjectVersion::clearAlwaysAvailableLanguageID | ( | ) |
eZContentObjectVersion::cloneVersion | ( | $newVersionNumber, | |
$userID, | |||
$contentObjectID = false , |
|||
$status = eZContentObjectVersion::STATUS_DRAFT |
|||
) |
Clones the version with new version $newVersionNumber and creator $userID
eZContentObjectVersion::contentObject | ( | ) |
Referenced by hasConflicts(), name(), nonTranslatableAttributesToUpdate(), and tempMainNode().
Returns the attributes for the current content object version. If $language is not specified it will use the initial language of the version.
Referenced by dataMap(), postUnserialize(), removeTranslation(), and serialize().
|
static |
Referenced by eZContentObject\createInitialVersion(), and eZContentClass\instantiate().
eZContentObjectVersion::creator | ( | ) |
eZContentObjectVersion::dataMap | ( | ) |
eZContentObjectVersion::defaultTranslationList | ( | ) |
|
static |
Referenced by fetch(), eZContentFunctionCollection\fetchDraftVersionCount(), eZContentFunctionCollection\fetchDraftVersionList(), fetchFiltered(), fetchForUser(), fetchLatestUserDraft(), eZContentFunctionCollection\fetchPendingCount(), eZContentFunctionCollection\fetchPendingList(), fetchUserDraft(), fetchVersion(), eZContentFunctionCollection\fetchVersionCount(), eZContentFunctionCollection\fetchVersionList(), and eZContentObject\versions().
eZContentObjectVersion::eZContentObjectVersion | ( | $row = array() | ) |
Referenced by create().
|
static |
Referenced by ezpContentPublishingProcess\version().
|
static |
Returns the attributes for the content object version $version and content object $contentObjectID. $language defines the language to fetch.
Referenced by contentObjectAttributes(), and eZContentObjectTranslation\objectAttributes().
|
static |
Referenced by removeVersions().
|
static |
Referenced by eZContentObject\cleanupAllInternalDrafts().
|
static |
Fetch the latest draft by user id.
int | $objectID | |
int | $userID | |
int | $languageID | |
int | $modified |
Referenced by eZContentObjectTreeNode\dataMap().
|
static |
|
static |
Referenced by ezpContentPublishingQueue\add(), eZApproveCollaborationHandler\contentObjectVersion(), eZContentObjectTreeNode\contentObjectVersionObject(), eZContentObject\currentVersion(), eZPublishType\eventContent(), ezpContentPublishingProcess\fetchByContentObjectVersion(), eZContentFunctionCollection\fetchContentVersion(), eZContentFunctionCollection\fetchNonTranslationList(), eZImageAliasHandler\initializeFromFile(), eZImageAliasHandler\initializeFromHTTPFile(), eZContentObjectPackageHandler\installSuspendedObjectRelations(), eZContentObjectAttribute\objectVersion(), eZObjectRelationListType\onPublish(), eZObjectRelationListType\removeRelationObject(), eZContentOperationCollection\sendToPublishingQueue(), eZObjectRelationListType\storeObjectAttribute(), and eZContentObject\version().
eZContentObjectVersion::hasConflicts | ( | $editLanguage = false | ) |
eZContentObjectVersion::initialLanguage | ( | ) |
Referenced by initialLanguageCode().
eZContentObjectVersion::initialLanguageCode | ( | ) |
Referenced by contentObjectAttributes(), hasConflicts(), serialize(), and versionName().
eZContentObjectVersion::languageMask | ( | ) |
eZContentObjectVersion::mainParentNodeID | ( | ) |
|
staticprivate |
Maps input lange to another one if defined in $options['language_map']. If it cannot map it returns the original language.
Referenced by unserialize().
eZContentObjectVersion::name | ( | $lang = false | ) |
eZContentObjectVersion::nodeAssignments | ( | ) |
Referenced by tempMainNode().
eZContentObjectVersion::nonTranslatableAttributesToUpdate | ( | ) |
eZContentObjectVersion::nonTranslationList | ( | ) |
eZContentObjectVersion::parentNodes | ( | ) |
eZContentObjectVersion::postUnserialize | ( | $package | ) |
eZContentObjectVersion::relatedContentObjectArray | ( | ) |
Returns the related objects.
eZContentObjectVersion::removeAssignment | ( | $nodeID | ) |
eZContentObjectVersion::removeThis | ( | ) |
eZContentObjectVersion::removeTranslation | ( | $languageCode | ) |
|
static |
Will remove all version that match the status set in $versionStatus.
$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). |
Referenced by eZContentObject\removeVersions().
eZContentObjectVersion::resetDataMap | ( | ) |
eZContentObjectVersion::reverseRelatedObjectList | ( | ) |
eZContentObjectVersion::serialize | ( | $package, | |
$options = false , |
|||
$contentNodeIDArray = false , |
|||
$topNodeIDArray = false |
|||
) |
package | |
options | package options ( optional ) |
contentNodeIDArray | array of allowed nodes ( optional ) |
topNodeIDArray | array of top nodes in current package export (optional ) |
eZContentObjectVersion::setAlwaysAvailableLanguageID | ( | $languageID | ) |
Referenced by clearAlwaysAvailableLanguageID().
|
static |
eZContentObjectVersion::store | ( | $fieldFilters = null | ) |
Referenced by updateLanguageMask().
eZContentObjectVersion::tempMainNode | ( | ) |
eZContentObjectVersion::translation | ( | $asObject = true | ) |
Referenced by defaultTranslationList(), serialize(), translations(), and updateLanguageMask().
eZContentObjectVersion::translations | ( | $asObject = true | ) |
Referenced by nonTranslationList(), postUnserialize(), and removeThis().
eZContentObjectVersion::unpublish | ( | ) |
|
static |
Unserialize xml structure. Create object from xml input.
domNode | XML DOM Node |
contentObject | contentobject |
ownerID | owner ID |
sectionID | section ID |
activeVersion | new object, true if first version of new object |
options | |
package |
Referenced by eZContentObject\unserialize().
Referenced by removeTranslation().
eZContentObjectVersion::versionName | ( | $lang = false | ) |
eZContentObjectVersion::$CurrentLanguage = false |
Referenced by contentObjectAttributes().
const eZContentObjectVersion::STATUS_ARCHIVED = 3 |
const eZContentObjectVersion::STATUS_DRAFT = 0 |
Referenced by assignToNode(), checkAccess(), eZApproveType\checkApproveCollaboration(), contentObjectAttributes(), eZContentObject\copyVersion(), eZContentFunctions\createAndPublishObject(), eZWebDAVContentServer\createFolder(), eZWebDAVContentBackend\createFolder(), eZContentFunctionCollection\fetchDraftVersionCount(), eZContentFunctionCollection\fetchDraftVersionList(), fetchLatestUserDraft(), fetchUserDraft(), importRSSItem(), eZTextFileUser\loginUser(), nonTranslatableAttributesToUpdate(), eZLDAPUser\publishNewUserGroup(), eZLDAPUser\publishUpdateUser(), removeVersions(), statusList(), eZObjectRelationListType\storeObjectAttribute(), and unserialize().
const eZContentObjectVersion::STATUS_INTERNAL_DRAFT = 5 |
Referenced by assignToNode(), checkAccess(), eZContentObject\cleanupAllInternalDrafts(), eZContentObject\cleanupInternalDrafts(), contentObjectAttributes(), eZContentObject\createWithNodeAssignment(), fetchLatestUserDraft(), fetchUserDraft(), nonTranslatableAttributesToUpdate(), and removeVersions().
const eZContentObjectVersion::STATUS_PENDING = 2 |
const eZContentObjectVersion::STATUS_PUBLISHED = 1 |
const eZContentObjectVersion::STATUS_QUEUED = 7 |
const eZContentObjectVersion::STATUS_REJECTED = 4 |
Referenced by eZApproveType\checkApproveCollaboration(), removeVersions(), and statusList().
const eZContentObjectVersion::STATUS_REPEAT = 6 |
Referenced by eZModuleOperationInfo\executeTrigger().