eZPublish  3.8
eZContentObjectVersion Class Reference

The class eZContentObjectVersion handles different versions of an content object eZKernel. 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 ()
 
 clone ($newVersionNumber, $userID, $contentObjectID=false, $status=EZ_VERSION_STATUS_DRAFT)
 
contentObject ()
 
contentObjectAttributes ($languageCode=false, $asObject=true)
 
 create ($contentobjectID, $userID=false, $version=1, $initialLanguageCode=false)
 
creator ()
 
dataMap ()
 
defaultTranslationList ()
 
 definition ()
 
 eZContentObjectVersion ($row=array())
 
 fetch ($id, $asObject=true)
 
 fetchFiltered ($filters, $offset, $limit)
 
 fetchForUser ($userID, $status=EZ_VERSION_STATUS_DRAFT)
 
 fetchUserDraft ($objectID, $userID)
 
 fetchVersion ($version, $contentObjectID, $asObject=true)
 
 hasConflicts ($editLanguage=false)
 
initialLanguage ()
 
 initialLanguageCode ()
 
languageMask ()
 
mainParentNodeID ()
 
name ($lang=false)
 
nodeAssignments ()
 
 nonTranslatableAttributesToUpdate ()
 
nonTranslationList ()
 
parentNodes ()
 
 postUnserialize (&$package)
 
relatedContentObjectArray ()
 
 remove ()
 
 removeAssignment ($nodeID)
 
 removeTranslation ($languageCode)
 
 resetDataMap ()
 
reverseRelatedObjectList ()
 
 serialize (&$package, $options=false, $contentNodeIDArray=false, $topNodeIDArray=false)
 
 setAlwaysAvailableLanguageID ($languageID)
 
 statusList ($limit=false)
 
tempMainNode ()
 
translation ($asObject=true)
 
translationList ($language=false, $asObject=true)
 
translations ($asObject=true)
 
 unpublish ()
 
 updateLanguageMask ($mask=false, $forceStore=true)
 
versionName ($lang=false)
 
- Public Member Functions inherited from eZPersistentObject
attribute ($attr, $noFunction=false)
 
 attributes ()
 
 conditionText (&$conditions)
 
conditionTextByRow (&$conditions, &$row)
 
 definition ()
 
escapeArray (&$array)
 
 eZPersistentObject ($row)
 
 fetchObject (&$def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
 
 fetchObjectList (&$def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null)
 
 fill (&$row)
 
 getShortAttributeName (&$db, &$def, $attrName)
 
 handleRows (&$rows, $class_name, $asObject)
 
 hasAttribute ($attr)
 
 hasDirtyData ()
 
 newObjectOrder (&$def, $orderField, $conditions)
 
 remove ($conditions=null, $extraConditions=null)
 
 removeObject (&$def, $conditions=null, $extraConditions=null)
 
 reorderObject (&$def, $orderField, $conditions, $down=true)
 
 setAttribute ($attr, $val)
 
 setHasDirtyData ($hasDirtyData)
 
 store ($fieldFilters=null)
 
 swapRow ($table, &$keys, &$order_id, &$rows, $id1, $id2)
 
 sync ($fieldFilters=null)
 
 updateObjectList ($parameters)
 

Static Public Member Functions

 fetchAttributes ($version, $contentObjectID, $language=false, $asObject=true)
 
 removeVersions ($versionStatus=false, $limit=false, $expiryTime=false, $fetchPortionSize=50)
 
unserialize (&$domNode, &$contentObject, $ownerID, $sectionID, $activeVersion, $firstVersion, &$nodeList, &$options, &$package, $handlerType= 'ezcontentobject')
 

Public Attributes

 $CurrentLanguage = false
 

Private Member Functions

 mapLanguage ($language, $options)
 

Detailed Description

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

Member Function Documentation

& eZContentObjectVersion::assignToNode (   $nodeID,
  $main = 0,
  $fromNodeID = 0,
  $sortField = null,
  $sortOrder = null,
  $remoteID = 0 
)
& eZContentObjectVersion::canVersionRead ( )
Returns
true if the current user can read this version of the object.
Note
The reference for the return value is required to workaround a bug with PHP references.
& eZContentObjectVersion::canVersionRemove ( )
Returns
true if the current user can remove this version of the object.
Note
The reference for the return value is required to workaround a bug with PHP references.
eZContentObjectVersion::checkAccess (   $functionName,
  $originalClassID = false,
  $parentClassID = false,
  $returnAccessList = false,
  $language = false 
)

Referenced by canVersionRead(), and canVersionRemove().

eZContentObjectVersion::clearAlwaysAvailableLanguageID ( )
eZContentObjectVersion::clone (   $newVersionNumber,
  $userID,
  $contentObjectID = false,
  $status = EZ_VERSION_STATUS_DRAFT 
)

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

Note
The cloned version is not stored.
& eZContentObjectVersion::contentObject ( )
& 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.

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

eZContentObjectVersion::create (   $contentobjectID,
  $userID = false,
  $version = 1,
  $initialLanguageCode = false 
)
& eZContentObjectVersion::creator ( )
Returns
the creator of the current version.
& eZContentObjectVersion::dataMap ( )

Returns the attributes for the current content object version. The wanted language must be specified.

Returns
the content object attribute
& eZContentObjectVersion::defaultTranslationList ( )
Returns
An array with all translations except default language for the this version.
Note
The reference for the return value is required to workaround a bug with PHP references.
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.
eZContentObjectVersion::eZContentObjectVersion (   $row = array())

Referenced by create().

eZContentObjectVersion::fetch (   $id,
  $asObject = true 
)
Returns
true if the requested attribute exists in object.
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.

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

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

Referenced by removeVersions().

eZContentObjectVersion::fetchForUser (   $userID,
  $status = EZ_VERSION_STATUS_DRAFT 
)
eZContentObjectVersion::fetchUserDraft (   $objectID,
  $userID 
)
eZContentObjectVersion::hasConflicts (   $editLanguage = false)
& eZContentObjectVersion::initialLanguage ( )

Referenced by initialLanguageCode().

eZContentObjectVersion::initialLanguageCode ( )
& eZContentObjectVersion::languageMask ( )
& eZContentObjectVersion::mainParentNodeID ( )
Note
The reference for the return value is required to workaround a bug with PHP references.
eZContentObjectVersion::mapLanguage (   $language,
  $options 
)
private

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

Returns
string

Referenced by unserialize().

& eZContentObjectVersion::name (   $lang = false)
Returns
the name of the current version, optionally in the specific language $lang
& eZContentObjectVersion::nodeAssignments ( )

Referenced by tempMainNode().

eZContentObjectVersion::nonTranslatableAttributesToUpdate ( )
& 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.
& eZContentObjectVersion::parentNodes ( )
eZContentObjectVersion::postUnserialize ( $package)
& eZContentObjectVersion::relatedContentObjectArray ( )

Returns the related objects.

Referenced by serialize().

eZContentObjectVersion::remove ( )
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.
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.
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.
eZContentObjectVersion::removeVersions (   $versionStatus = false,
  $limit = false,
  $expiryTime = false,
  $fetchPortionSize = 50 
)
static

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

Parameters
$versionStatuscan either be a single value or an array with values, if false the function will remove all status except published.
$limitlimits count of versions which should be removed.
$expiryTimeif not false then method will remove only versions which have modified time less than specified expiry time.
$fetchPortionSizeportion 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.

Referenced by eZContentObject\removeVersions().

eZContentObjectVersion::resetDataMap ( )
& eZContentObjectVersion::reverseRelatedObjectList ( )
Note
The reference for the return value is required to workaround a bug with PHP references.
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
packageoptions ( optianal )
arrayof allowed nodes ( optional )
arrayof 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.
eZContentObjectVersion::setAlwaysAvailableLanguageID (   $languageID)
eZContentObjectVersion::statusList (   $limit = false)
& eZContentObjectVersion::tempMainNode ( )
Returns
an eZContentObjectTreeNode object which doesn't really exist in the DB, this can be passed to a node view template.
& eZContentObjectVersion::translation (   $asObject = true)
Returns
An array with all the translations for the current version.
Note
The reference for the return value is required to workaround a bug with PHP references.
Deprecated:
& eZContentObjectVersion::translationList (   $language = false,
  $asObject = true 
)
Returns
An array with all the translations for the current version.
Note
The reference for the return value is required to workaround a bug with PHP references.
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.

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

& eZContentObjectVersion::translations (   $asObject = true)
Returns
An array with all the translations for the current version.
Note
The reference for the return value is required to workaround a bug with PHP references.

Referenced by nonTranslationList(), postUnserialize(), and remove().

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.
& eZContentObjectVersion::unserialize ( $domNode,
$contentObject,
  $ownerID,
  $sectionID,
  $activeVersion,
  $firstVersion,
$nodeList,
$options,
$package,
  $handlerType = 'ezcontentobject' 
)
static

Unserialize xml structure. Create object from xml input.

Parameters
XMLDOM Node
contentobject.
ownerID
sectionID
newobject, true if first version of new object
options
package
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.

Referenced by eZContentObject\unserialize().

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

Referenced by removeTranslation().

& eZContentObjectVersion::versionName (   $lang = false)
Returns
the name of the current version, optionally in the specific language $lang

Member Data Documentation

eZContentObjectVersion::$CurrentLanguage = false

Referenced by contentObjectAttributes().


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