|
eZ Publish
[trunk]
|
The class eZContentObjectVersion handles different versions of an content object. More...
Inheritance diagram for eZContentObjectVersion:
Collaboration diagram for eZContentObjectVersion: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) | |
| Stores the object in the database, uses storeObject() to do the actual job and passes $fieldFilters to it. | |
| tempMainNode () | |
| translation ($asObject=true) | |
| translationList ($language=false, $asObject=true) | |
| translations ($asObject=true) | |
| unpublish () | |
| updateLanguageMask ($mask=false, $forceStore=true) | |
| versionName ($lang=false) | |
Static Public Member Functions | |
| static | create ($contentobjectID, $userID=false, $version=1, $initialLanguageCode=false) |
| static | definition () |
| Returns the definition for the object, the default implementation is to return an empty array. | |
| 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. | |
| 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') |
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 |
Static Private Member Functions | |
| static | mapLanguage ($language, $options) |
The class eZContentObjectVersion handles different versions of an content object.
Definition at line 18 of file ezcontentobjectversion.php.
| eZContentObjectVersion::assignToNode | ( | $ | nodeID, |
| $ | main = 0, |
||
| $ | fromNodeID = 0, |
||
| $ | sortField = null, |
||
| $ | sortOrder = null, |
||
| $ | remoteID = 0 |
||
| ) |
Definition at line 761 of file ezcontentobjectversion.php.
true if the current user can read this version of the object. Definition at line 352 of file ezcontentobjectversion.php.
true if the current user can remove this version of the object. Definition at line 364 of file ezcontentobjectversion.php.
| eZContentObjectVersion::checkAccess | ( | $ | functionName, |
| $ | originalClassID = false, |
||
| $ | parentClassID = false, |
||
| $ | returnAccessList = false, |
||
| $ | language = false |
||
| ) |
Definition at line 373 of file ezcontentobjectversion.php.
Referenced by canVersionRead(), and canVersionRemove().
Definition at line 1713 of file ezcontentobjectversion.php.
| eZContentObjectVersion::cloneVersion | ( | $ | newVersionNumber, |
| $ | userID, | ||
| $ | contentObjectID = false, |
||
| $ | status = eZContentObjectVersion::STATUS_DRAFT |
||
| ) |
Clones the version with new version $newVersionNumber and creator $userID
Definition at line 1041 of file ezcontentobjectversion.php.
Definition at line 723 of file ezcontentobjectversion.php.
Referenced by hasConflicts(), name(), nonTranslatableAttributesToUpdate(), and tempMainNode().
| 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 1133 of file ezcontentobjectversion.php.
Referenced by dataMap(), postUnserialize(), removeTranslation(), and serialize().
| static eZContentObjectVersion::create | ( | $ | contentobjectID, |
| $ | userID = false, |
||
| $ | version = 1, |
||
| $ | initialLanguageCode = false |
||
| ) | [static] |
Definition at line 850 of file ezcontentobjectversion.php.
Referenced by assignToNode(), and tempMainNode().
Definition at line 1543 of file ezcontentobjectversion.php.
Definition at line 805 of file ezcontentobjectversion.php.
Definition at line 1124 of file ezcontentobjectversion.php.
| 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:
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" ); }
Reimplemented from eZPersistentObject.
Definition at line 40 of file ezcontentobjectversion.php.
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() | ) |
Definition at line 30 of file ezcontentobjectversion.php.
Referenced by create().
| static eZContentObjectVersion::fetch | ( | $ | id, |
| $ | asObject = true |
||
| ) | [static] |
Definition at line 149 of file ezcontentobjectversion.php.
Referenced by checkAccess(), contentObject(), creator(), initialLanguage(), nonTranslatableAttributesToUpdate(), and ezpContentPublishingProcess\version().
| 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.
Definition at line 1158 of file ezcontentobjectversion.php.
Referenced by contentObjectAttributes(), and eZContentObjectTranslation\objectAttributes().
| static eZContentObjectVersion::fetchFiltered | ( | $ | filters, |
| $ | offset, | ||
| $ | limit | ||
| ) | [static] |
Definition at line 229 of file ezcontentobjectversion.php.
Referenced by removeVersions().
| static eZContentObjectVersion::fetchForUser | ( | $ | userID, |
| $ | status = eZContentObjectVersion::STATUS_DRAFT |
||
| ) | [static] |
Definition at line 219 of file ezcontentobjectversion.php.
Referenced by eZContentObject\cleanupAllInternalDrafts().
| static eZContentObjectVersion::fetchLatestUserDraft | ( | $ | objectID, |
| $ | userID, | ||
| $ | languageID, | ||
| $ | modified = 0 |
||
| ) | [static] |
Fetch the latest draft by user id.
| int | $objectID | |
| int | $userID | |
| int | $languageID | |
| int | $modified |
Definition at line 192 of file ezcontentobjectversion.php.
Referenced by eZContentObjectTreeNode\dataMap().
| static eZContentObjectVersion::fetchUserDraft | ( | $ | objectID, |
| $ | userID | ||
| ) | [static] |
Definition at line 168 of file ezcontentobjectversion.php.
| static eZContentObjectVersion::fetchVersion | ( | $ | version, |
| $ | contentObjectID, | ||
| $ | asObject = true |
||
| ) | [static] |
Definition at line 157 of file ezcontentobjectversion.php.
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 | ) |
Definition at line 1723 of file ezcontentobjectversion.php.
Definition at line 1634 of file ezcontentobjectversion.php.
Referenced by initialLanguageCode().
Definition at line 1639 of file ezcontentobjectversion.php.
Referenced by contentObjectAttributes(), hasConflicts(), serialize(), and versionName().
Definition at line 1614 of file ezcontentobjectversion.php.
Definition at line 732 of file ezcontentobjectversion.php.
| 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.
Definition at line 1209 of file ezcontentobjectversion.php.
Referenced by unserialize().
| eZContentObjectVersion::name | ( | $ | lang = false | ) |
Definition at line 291 of file ezcontentobjectversion.php.
Definition at line 756 of file ezcontentobjectversion.php.
Referenced by tempMainNode().
Definition at line 1648 of file ezcontentobjectversion.php.
Definition at line 1594 of file ezcontentobjectversion.php.
Definition at line 745 of file ezcontentobjectversion.php.
| eZContentObjectVersion::postUnserialize | ( | $ | package | ) |
Definition at line 1406 of file ezcontentobjectversion.php.
Returns the related objects.
Definition at line 844 of file ezcontentobjectversion.php.
| eZContentObjectVersion::removeAssignment | ( | $ | nodeID | ) |
Definition at line 786 of file ezcontentobjectversion.php.
Definition at line 886 of file ezcontentobjectversion.php.
| eZContentObjectVersion::removeTranslation | ( | $ | languageCode | ) |
Definition at line 948 of file ezcontentobjectversion.php.
| static eZContentObjectVersion::removeVersions | ( | $ | versionStatus = false, |
| $ | limit = false, |
||
| $ | expiryTime = false, |
||
| $ | fetchPortionSize = 50 |
||
| ) | [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). |
Definition at line 977 of file ezcontentobjectversion.php.
Definition at line 834 of file ezcontentobjectversion.php.
Definition at line 877 of file ezcontentobjectversion.php.
| 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 ) |
Definition at line 1427 of file ezcontentobjectversion.php.
| eZContentObjectVersion::setAlwaysAvailableLanguageID | ( | $ | languageID | ) |
Definition at line 1679 of file ezcontentobjectversion.php.
Referenced by clearAlwaysAvailableLanguageID().
| static eZContentObjectVersion::statusList | ( | $ | limit = false | ) | [static] |
Definition at line 126 of file ezcontentobjectversion.php.
| 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.
| array | null | $fieldFilters |
Reimplemented from eZPersistentObject.
Definition at line 1750 of file ezcontentobjectversion.php.
Referenced by updateLanguageMask().
Definition at line 245 of file ezcontentobjectversion.php.
| eZContentObjectVersion::translation | ( | $ | asObject = true | ) |
Definition at line 1069 of file ezcontentobjectversion.php.
| eZContentObjectVersion::translationList | ( | $ | language = false, |
| $ | asObject = true |
||
| ) |
Definition at line 1080 of file ezcontentobjectversion.php.
Referenced by defaultTranslationList(), nonTranslationList(), serialize(), translations(), and updateLanguageMask().
| eZContentObjectVersion::translations | ( | $ | asObject = true | ) |
Definition at line 1060 of file ezcontentobjectversion.php.
Referenced by nonTranslationList(), postUnserialize(), and removeThis().
Definition at line 1556 of file ezcontentobjectversion.php.
| static eZContentObjectVersion::unserialize | ( | $ | domNode, |
| $ | contentObject, | ||
| $ | ownerID, | ||
| $ | sectionID, | ||
| $ | activeVersion, | ||
| $ | firstVersion, | ||
| &$ | nodeList, | ||
| &$ | options, | ||
| $ | package, | ||
| $ | handlerType = 'ezcontentobject' |
||
| ) | [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 |
Definition at line 1234 of file ezcontentobjectversion.php.
| eZContentObjectVersion::updateLanguageMask | ( | $ | mask = false, |
| $ | forceStore = true |
||
| ) |
Definition at line 1619 of file ezcontentobjectversion.php.
Referenced by removeTranslation().
| eZContentObjectVersion::versionName | ( | $ | lang = false | ) |
Definition at line 319 of file ezcontentobjectversion.php.
| eZContentObjectVersion::$CurrentLanguage = false |
Definition at line 1756 of file ezcontentobjectversion.php.
| const eZContentObjectVersion::STATUS_ARCHIVED = 3 |
Definition at line 23 of file ezcontentobjectversion.php.
Referenced by eZContentObject\createNewVersion(), hasConflicts(), eZObjectRelationListType\onPublish(), removeVersions(), statusList(), and unpublish().
| const eZContentObjectVersion::STATUS_DRAFT = 0 |
Definition at line 20 of file ezcontentobjectversion.php.
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(), tempMainNode(), and unserialize().
Definition at line 25 of file ezcontentobjectversion.php.
Referenced by assignToNode(), checkAccess(), eZContentObject\cleanupAllInternalDrafts(), eZContentObject\cleanupInternalDrafts(), contentObjectAttributes(), eZContentObject\createWithNodeAssignment(), fetchLatestUserDraft(), fetchUserDraft(), nonTranslatableAttributesToUpdate(), and removeVersions().
| const eZContentObjectVersion::STATUS_PENDING = 2 |
Definition at line 22 of file ezcontentobjectversion.php.
Referenced by checkAccess(), contentObjectAttributes(), eZContentFunctionCollection\fetchPendingCount(), eZContentFunctionCollection\fetchPendingList(), nonTranslatableAttributesToUpdate(), eZContentObjectTreeNode\removeSubtrees(), removeVersions(), and statusList().
| const eZContentObjectVersion::STATUS_PUBLISHED = 1 |
Definition at line 21 of file ezcontentobjectversion.php.
Referenced by checkAccess(), eZURL\handleList(), hasConflicts(), eZImageAliasHandler\imagePath(), eZObjectRelationListType\onPublish(), eZContentOperationCollection\setObjectStatusPublished(), statusList(), tempMainNode(), unpublish(), and eZContentObject\unserialize().
| const eZContentObjectVersion::STATUS_QUEUED = 7 |
Definition at line 28 of file ezcontentobjectversion.php.
| const eZContentObjectVersion::STATUS_REJECTED = 4 |
Definition at line 24 of file ezcontentobjectversion.php.
Referenced by eZApproveType\checkApproveCollaboration(), removeVersions(), and statusList().
| const eZContentObjectVersion::STATUS_REPEAT = 6 |
Definition at line 27 of file ezcontentobjectversion.php.
Referenced by eZModuleOperationInfo\executeTrigger().