eZ Publish  [4.2]
eZContentObject Class Reference

Handles eZ Publish content objects. More...

+ Inheritance diagram for eZContentObject:
+ Collaboration diagram for eZContentObject:

List of all members.

Public Member Functions

 __clone ()
 accessList ($function)
 addContentObjectRelation ($toObjectID, $fromObjectVersion=false, $attributeID=0, $relationType=eZContentObject::RELATION_COMMON)
 addLocation ($parentNodeID, $asObject=false)
 allContentObjectAttributes ($contentObjectID, $asObject=true)
 allLanguages ()
 allowedAssignSectionList ()
 allowedAssignStateIDList (eZUser $user=null)
 Gets a list of states a user is allowed to put the content object in.
 allowedAssignStateList (eZUser $user=null)
 appendInputRelationList ($addingIDList, $relationType)
 assignDefaultStates ()
 Sets the default states of a content object.
 assignedNodes ($asObject=true)
 assignState (eZContentObjectState $state)
 Sets the state of a content object.
 authorArray ()
 availableLanguages ()
 availableLanguagesJsArray ()
 cacheInfo ($Params)
 canCreate ()
 canCreateClassList ($asObject=false, $includeFilter=true, $groupList=false, $fetchID=false)
 canCreateLanguages ()
 canDiff ()
 canEdit ($originalClassID=false, $parentClassID=false, $returnAccessList=false, $language=false)
 canEditLanguages ()
 canMove ()
 canMoveFrom ()
 canPdf ()
 canRead ()
 canRemove ()
 canTranslate ()
 canViewEmbed ()
 checkAccess ($functionName, $originalClassID=false, $parentClassID=false, $returnAccessList=false, $language=false)
 checkGroupLimitationAccess ($limitationValueList, $userID, $contentObjectID=false)
 classListFromPolicy ($policy, $allowedLanguageCodes=false)
 className ()
 cleanupInternalDrafts ($userID=false, $timeDuration=86400)
 commitInputRelations ($editVersion)
 contentActionList ()
 contentClass ()
 contentClassGroupIDList ()
 contentClassIdentifier ()
 contentObjectAttributes ($asObject=true, $version=false, $language=false, $contentObjectAttributeID=false, $distinctItemsOnly=false)
 contentObjectListRelatingThis ($version=false)
 copy ($allVersions=true)
 copyContentObjectRelations ($currentVersion, $newVersion, $newObjectID=false)
 copyRevertTo ($version, $language=false)
 copyVersion (&$newObject, &$version, $newVersionNumber, $contentObjectID=false, $status=eZContentObjectVersion::STATUS_DRAFT, $languageCode=false, $copyFromLanguageCode=false)
 createInitialVersion ($userID, $initialLanguageCode=false)
 createNewVersion ($copyFromVersion=false, $versionCheck=true, $languageCode=false, $copyFromLanguageCode=false, $status=eZContentObjectVersion::STATUS_DRAFT)
 createNewVersionIn ($languageCode, $copyFromLanguageCode=false, $copyFromVersion=false, $versionCheck=true, $status=eZContentObjectVersion::STATUS_DRAFT)
 createNodeAssignment ($parentNodeID, $isMain, $remoteID=false, $sortField=eZContentObjectTreeNode::SORT_FIELD_PUBLISHED, $sortOrder=eZContentObjectTreeNode::SORT_ORDER_DESC)
 currentLanguage ()
 currentLanguageObject ()
 currentVersion ($asObject=true)
 dataMap ()
 embeddedContentObjectCount ($fromObjectVersion=false)
 embeddedContentObjectList ($fromObjectVersion=false, $fromObjectID=false)
 eZContentObject ($row)
 fetchAttributesByIdentifier ($identifierArray, $version=false, $languageArray=false, $asObject=true)
 fetchClassAttributes ($version=0, $asObject=true)
 fetchDataMap ($version=false, $language=false)
 fetchInput ($contentObjectAttributes, $attributeDataBaseName, $customActionAttributeArray, $customActionParameters)
 fixupInput ($contentObjectAttributes, $attributeDataBaseName)
 getVersionCount ()
 handleAllCustomHTTPActions ($attributeDataBaseName, $customActionAttributeArray, $customActionParameters, $objectVersion=false)
 handleCustomHTTPActions ($contentObjectAttribute, $attributeDataBaseName, $customActionAttributeArray, $customActionParameters)
 hasContentAction ($name)
 hasRemainingVersions ()
 initialLanguage ()
 initialLanguageCode ()
 isAlwaysAvailable ()
 languages ()
 linkedContentObjectCount ($fromObjectVersion=false)
 linkedContentObjectList ($fromObjectVersion=false, $fromObjectID=false)
 mainNode ()
 mainNodeID ()
 mainParentNodeID ()
 matchIngroupIDList ()
 name ($version=false, $lang=false)
 names ()
 nextVersion ()
 owner ()
 parentNodeIDArray ()
 parentNodes ($version=false, $asObject=true)
 permissions ()
 postUnserialize ($package)
 previousVersion ()
 publishContentObjectRelations ($version)
 purge ()
 relatedContentObjectArray ($fromObjectVersion=false, $fromObjectID=false, $attributeID=0, $params=false)
 relatedContentObjectCount ($fromObjectVersion=false, $attributeID=0, $params=false)
 relatedContentObjectList ($fromObjectVersion=false, $fromObjectID=false, $attributeID=0, $groupByAttribute=false, $params=false)
 relatedObjectCount ($version=false, $attributeID=0, $reverseRelatedObjects=false, $params=false)
 Fetch the number of (reverse) related objects.
 relatedObjects ($fromObjectVersion=false, $objectID=false, $attributeID=0, $groupByAttribute=false, $params=false, $reverseRelatedObjects=false)
 remoteID ()
 removeContentObjectRelation ($toObjectID=false, $fromObjectVersion=false, $attributeID=0, $relationType=eZContentObject::RELATION_COMMON)
 removeReverseRelations ($objectID)
 removeThis ($nodeID=null)
 removeTranslation ($languageID)
 rename ($newName)
 resetDataMap ()
 resetInputRelationList ()
 reverseEmbeddedObjectCount ($fromObjectVersion=false)
 reverseEmbeddedObjectList ($fromObjectVersion=false, $fromObjectID=false)
 reverseLinkedObjectCount ($fromObjectVersion=false)
 reverseLinkedObjectList ($fromObjectVersion=false, $fromObjectID=false)
 reverseRelatedObjectCount ($version=false, $attributeID=0, $params=false)
 reverseRelatedObjectList ($version=false, $attributeID=0, $groupByAttribute=false, $params=false)
 revertTo ($version)
 serialize ($package, $specificVersion=false, $options=false, $contentNodeIDArray=false, $topNodeIDArray=false)
 setAlwaysAvailableLanguageID ($languageID, $version=false)
 setCachedName ($name)
 setClassName ($name)
 setContentObjectAttributes (&$attributes, $version, $language)
 setCurrentLanguage ($lang)
 setName ($objectName, $versionNum=false, $languageCode=false)
 setPermissions ($permissionArray)
 stateIDArray ($refreshCache=false)
 Gets the current states of the content object.
 stateIdentifierArray ()
 store ($fieldFilters=null)
 storeInput ($contentObjectAttributes, $attributeInputMap)
 storeNodeModified ()
 validateInput ($contentObjectAttributes, $attributeDataBaseName, $inputParameters=false, $parameters=array())
 version ($version, $asObject=true)
 versionLanguageName ($version, $lang=false)
 versions ($asObject=true, $parameters=array())

Static Public Member Functions

static cleanupAllInternalDrafts ($userID=false, $timeDuration=86400)
static clearCache ($idArray=array())
static create ($name, $contentclassID, $userID, $sectionID=1, $version=1, $languageCode=false)
static createFetchSQLString ($id)
static createFilterByVisibilitySQLString ($IgnoreVisibility=false, $ezcontentobjectTable= 'ezcontentobject')
 Creates the SQL for filtering objects by visibility, used by IgnoreVisibility on some fetches.
static createWithNodeAssignment ($parentNode, $contentClassID, $languageCode, $remoteID=false)
static defaultLanguage ()
static definition ()
static exists ($id)
static expireAllCache ()
static expireAllViewCache ()
static expireComplexViewModeCache ()
static expireTemplateBlockCache ()
static expireTemplateBlockCacheIfNeeded ()
static fetch ($id, $asObject=true)
 Fetches a content object by ID.
static fetchByNodeID ($nodeID, $asObject=true)
static fetchByRemoteID ($remoteID, $asObject=true)
static fetchFilteredList ($conditions=null, $offset=false, $limit=false, $asObject=true)
static fetchIDArray ($idArray, $asObject=true)
 Fetches a content object list based on an array of content object ids.
static fetchList ($asObject=true, $conditions=null, $offset=false, $limit=false)
static fetchListCount ($conditions=null)
static fetchObjectCountByUserID ($classID, $userID)
static fetchSameClassList ($contentClassID, $asObject=true, $offset=false, $limit=false)
static fetchSameClassListCount ($contentClassID)
static fillNodeListAttributes ($objList, $asObject=true)
static fixReverseRelations ($objectID, $mode=false)
static isCacheExpired ($timestamp)
static isComplexViewMode ($viewMode)
static isComplexViewModeCacheExpired ($viewMode, $timestamp)
static isObjectRelationTyped ()
static recursionProtect ($id)
static recursionProtectionEnd ()
static recursionProtectionStart ()
static relationTypeMask ($allRelations=false)
static removeVersions ($versionStatus=false)
static setDefaultLanguage ($lang)
static translationList ()
static translationStringList ()
static unserialize ($package, $domNode, &$options, $ownerID=false, $handlerType= 'ezcontentobject')

Public Attributes

 $ClassIdentifier
 Cached class identifier.
 $ClassName
 Stores the current class name.
 $ContentActionList = false
 Contains an array of the content object actions for the current object.
 $ContentObjectAttributes = array()
 Contains a cached version of the content object attributes for the given version and language.
 $CurrentLanguage
 Stores the current language.
 $DataMap = array()
 Contains the datamap for content object attributes.
 $ID
 $InputRelationList = array()
 Contains the arrays of relatedobject id by fetching input for this object.
 $MainNodeID = false
 Contains the main node id for this object.
 $Name
const PACKAGE_DELETE = 4
const PACKAGE_ERROR_EXISTS = 2
const PACKAGE_ERROR_HAS_CHILDREN = 102
const PACKAGE_ERROR_MODIFIED = 101
const PACKAGE_ERROR_NO_CLASS = 1
const PACKAGE_ERROR_NODE_EXISTS = 3
const PACKAGE_KEEP = 5
const PACKAGE_NEW = 3
const PACKAGE_REPLACE = 1
const PACKAGE_SKIP = 2
const PACKAGE_UPDATE = 6
const RELATION_ATTRIBUTE = 8
const RELATION_COMMON = 1
const RELATION_EMBED = 2
const RELATION_LINK = 4
const STATUS_ARCHIVED = 2
const STATUS_DRAFT = 0
const STATUS_PUBLISHED = 1

Static Private Member Functions

static mapLanguage ($language, $options)

Private Attributes

 $StateIDArray = false

Detailed Description

Handles eZ Publish content objects.

It encapsulates the data for an object and provides lots of functions for dealing with versions, translations and attributes.

See also:
eZContentClass

Definition at line 42 of file ezcontentobject.php.


Member Function Documentation

eZContentObject::__clone ( )

Definition at line 1432 of file ezcontentobject.php.

eZContentObject::accessList ( function)

Get accesslist for specified function

Parameters:
function
Returns:
AccessList

Definition at line 4523 of file ezcontentobject.php.

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

Adds a link to the given content object id.

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 2567 of file ezcontentobject.php.

Referenced by commitInputRelations().

eZContentObject::addLocation ( parentNodeID,
asObject = false 
)

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

Parameters:
$parenNodeIDThe id of the node to use as parent.
$asObjectIf true it will return the new child-node as an object, if not it returns the ID.
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 2540 of file ezcontentobject.php.

eZContentObject::allContentObjectAttributes ( contentObjectID,
asObject = true 
)

Definition at line 1936 of file ezcontentobject.php.

Referenced by purge(), and revertTo().

eZContentObject::allLanguages ( )

Definition at line 4807 of file ezcontentobject.php.

eZContentObject::allowedAssignSectionList ( )

Definition at line 5816 of file ezcontentobject.php.

eZContentObject::allowedAssignStateIDList ( eZUser 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$userthe user to check the policies of, when omitted the currently logged in user will be used

Definition at line 5840 of file ezcontentobject.php.

Referenced by allowedAssignStateList().

eZContentObject::allowedAssignStateList ( eZUser user = null)

Definition at line 5935 of file ezcontentobject.php.

eZContentObject::appendInputRelationList ( addingIDList,
relationType 
)

Definition at line 2131 of file ezcontentobject.php.

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 6076 of file ezcontentobject.php.

eZContentObject::assignedNodes ( asObject = true)

Returns the node assignments for the current object.

Definition at line 3490 of file ezcontentobject.php.

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

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 6039 of file ezcontentobject.php.

eZContentObject::authorArray ( )

Returns a list of all the authors for this object. The returned value is an array of eZ user objects.

Definition at line 5503 of file ezcontentobject.php.

eZContentObject::availableLanguages ( )
Returns:
the languages the object has been translated into/exists in.

Returns an array with the language codes.

It uses the attribute avail_lang as the source for the language list.

Definition at line 4782 of file ezcontentobject.php.

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

eZContentObject::availableLanguagesJsArray ( )

Definition at line 4795 of file ezcontentobject.php.

eZContentObject::cacheInfo ( Params)
Returns:
a structure with information required for caching.

Definition at line 5373 of file ezcontentobject.php.

eZContentObject::canCreate ( )

Definition at line 4589 of file ezcontentobject.php.

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:
$asObjectIf true then it return eZContentClass objects, if not it will be an associative array with name and id keys.
$includeFilterIf true then it will include only from class groups defined in $groupList, if not it will exclude those groups.
$groupListAn array with class group IDs that should be used in filtering, use false if you do not wish to filter at all.
$fetchIDA unique name for the current fetch, this must be supplied when filtering is used if you want caching to work.

Definition at line 4383 of file ezcontentobject.php.

eZContentObject::canCreateLanguages ( )

Definition at line 3574 of file ezcontentobject.php.

eZContentObject::canDiff ( )
Returns:
true if the current user can diff this content object.

Definition at line 4580 of file ezcontentobject.php.

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

Definition at line 4598 of file ezcontentobject.php.

Referenced by canEditLanguages().

eZContentObject::canEditLanguages ( )

Definition at line 3556 of file ezcontentobject.php.

eZContentObject::canMove ( )

Check if the object can be moved. (actually checks 'edit' and 'remove' permissions)

Returns:
true if the object can be moved by the current user.
See also:
checkAccess().
Deprecated:
The function canMove() is preferred since its naming is clearer.

Definition at line 4666 of file ezcontentobject.php.

eZContentObject::canMoveFrom ( )

Check if the object can be moved. (actually checks 'edit' and 'remove' permissions)

Returns:
true if the object can be moved by the current user.
See also:
checkAccess().

Definition at line 4676 of file ezcontentobject.php.

Referenced by canMove().

eZContentObject::canPdf ( )
Returns:
true if the current user can create a pdf of this content object.

Definition at line 4555 of file ezcontentobject.php.

eZContentObject::canRead ( )
Returns:
true if the current user can read this content object.

Definition at line 4543 of file ezcontentobject.php.

eZContentObject::canRemove ( )

Definition at line 4650 of file ezcontentobject.php.

eZContentObject::canTranslate ( )

Definition at line 4629 of file ezcontentobject.php.

eZContentObject::canViewEmbed ( )
Returns:
true if the node can be viewed as embeded object by the current user.
See also:
checkAccess().

Definition at line 4568 of file ezcontentobject.php.

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

Check access for the current object

Parameters:
functionname ( edit, read, remove, etc. )
originalclass ID ( used to check access for object creation ), default false
parentclass id ( used to check access for object creation ), default false
returnaccess list instead of access result (optional, default false )
Returns:
1 if has access, 0 if not. If returnAccessList is set to true, access list is returned

Definition at line 3649 of file ezcontentobject.php.

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

eZContentObject::checkGroupLimitationAccess ( limitationValueList,
userID,
contentObjectID = false 
)
eZContentObject::classListFromPolicy ( policy,
allowedLanguageCodes = false 
)

Definition at line 4205 of file ezcontentobject.php.

Referenced by canCreateClassList().

eZContentObject::className ( )
Returns:
The name of the class which this object was created from.
Note:
The object will cache the class name information so multiple calls will be fast.

Definition at line 4691 of file ezcontentobject.php.

static eZContentObject::cleanupAllInternalDrafts ( userID = false,
timeDuration = 86400 
) [static]

Removes all old internal drafts by the specified user. Only internal drafts older than 1 day will be considered.

Parameters:
$userIDThe ID of the user to cleanup for, if false it will use the current user.

Definition at line 1904 of file ezcontentobject.php.

eZContentObject::cleanupInternalDrafts ( userID = false,
timeDuration = 86400 
)

Removes old internal drafts by the specified user associated with this content object. Only internal drafts older than 1 day will be considered.

Parameters:
$userIDThe ID of the user to cleanup for, if false it will use the current user.

Definition at line 1870 of file ezcontentobject.php.

static eZContentObject::clearCache ( idArray = array()) [static]

Clear in-memory caches.

Parameters:
$idArrayobjects to clear caches for.

If the parameter is ommitted the caches are cleared for all objects.

Definition at line 278 of file ezcontentobject.php.

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

eZContentObject::commitInputRelations ( editVersion)

Definition at line 2156 of file ezcontentobject.php.

Referenced by validateInput().

eZContentObject::contentActionList ( )

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

Definition at line 4716 of file ezcontentobject.php.

eZContentObject::contentClass ( )
Returns:
the content class for the current content object

Definition at line 712 of file ezcontentobject.php.

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

eZContentObject::contentClassGroupIDList ( )
Returns:
the content class group identifiers for the current content object

Definition at line 682 of file ezcontentobject.php.

eZContentObject::contentClassIdentifier ( )
Returns:
the content class identifer for the current content object
Note:
The object will cache the class name information so multiple calls will be fast.

Definition at line 693 of file ezcontentobject.php.

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

Definition at line 1952 of file ezcontentobject.php.

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

eZContentObject::contentObjectListRelatingThis ( version = false)

Returns the related objects.

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

Definition at line 3309 of file ezcontentobject.php.

eZContentObject::copy ( allVersions = true)

Makes a copy of the object which is stored and then returns 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.

Definition at line 1445 of file ezcontentobject.php.

eZContentObject::copyContentObjectRelations ( currentVersion,
newVersion,
newObjectID = false 
)

Definition at line 2740 of file ezcontentobject.php.

Referenced by copyVersion().

eZContentObject::copyRevertTo ( version,
language = false 
)

Copies the given version of the object and creates a new 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 1587 of file ezcontentobject.php.

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.

Parameters:
$languageCodeIf false all languages will be copied, otherwise only specified by the locale code string or an array of the locale code strings.
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 1283 of file ezcontentobject.php.

Referenced by copy(), and createNewVersion().

static eZContentObject::create ( name,
contentclassID,
userID,
sectionID = 1,
version = 1,
languageCode = false 
) [static]

Creates a new content object instance and stores it.

Definition at line 1407 of file ezcontentobject.php.

Referenced by addLocation(), createInitialVersion(), and createNodeAssignment().

static eZContentObject::createFetchSQLString ( id) [static]

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

Definition at line 856 of file ezcontentobject.php.

Referenced by exists(), and fetch().

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$IgnoreVisibilityignores visibility if true
string$ezcontentobjectTablename of ezcontentobject table used in sql
Returns:
string with sql condition for node filtering by visibility

Definition at line 885 of file ezcontentobject.php.

Referenced by relatedObjectCount(), and relatedObjects().

eZContentObject::createInitialVersion ( userID,
initialLanguageCode = false 
)

Definition at line 1163 of file ezcontentobject.php.

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. If version number is given as argument that version is used to create a copy.

Parameters:
$versionCheckIf true it will check if there are too many version and remove some of them to make room for a new.
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 ezcontentobject.php.

Referenced by createNewVersionIn(), and rename().

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

Definition at line 1168 of file ezcontentobject.php.

Referenced by copyRevertTo().

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

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

Returns:
The eZNodeAssignment object it created
Parameters:
$parentNodeIDThe node ID of the parent node
$isMaintrue if the created node is the main node of the object
$remoteIDA string denoting the unique remote ID of the assignment or false for no remote id.
$sortField
$sortOrder
Note:
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.

Definition at line 3440 of file ezcontentobject.php.

static eZContentObject::createWithNodeAssignment ( parentNode,
contentClassID,
languageCode,
remoteID = false 
) [static]
eZContentObject::currentLanguage ( )

Definition at line 2496 of file ezcontentobject.php.

eZContentObject::currentLanguageObject ( )

Definition at line 2501 of file ezcontentobject.php.

eZContentObject::currentVersion ( asObject = true)

Returns the current version of this document.

Definition at line 1087 of file ezcontentobject.php.

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

eZContentObject::dataMap ( )
Returns:
a map with all the content object attributes where the keys are the attribute identifiers.

Definition at line 516 of file ezcontentobject.php.

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:

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 98 of file ezcontentobject.php.

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

eZContentObject::embeddedContentObjectCount ( fromObjectVersion = false)

Returns the xml-embedded objects count.

Definition at line 3139 of file ezcontentobject.php.

eZContentObject::embeddedContentObjectList ( fromObjectVersion = false,
fromObjectID = false 
)

Returns the xml-embedded objects.

Definition at line 3021 of file ezcontentobject.php.

static eZContentObject::exists ( id) [static]

Tests for the existance of a content object by using the ID $id.

Returns:
true if the object exists, false otherwise.
Note:
Uses the static function createFetchSQLString() to generate the SQL

Definition at line 830 of file ezcontentobject.php.

static eZContentObject::expireAllCache ( ) [static]

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

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 5409 of file ezcontentobject.php.

Referenced by eZContentCacheManager\clearAllContentCache().

static eZContentObject::expireAllViewCache ( ) [static]

Sets all view cache files to be expired

Definition at line 5396 of file ezcontentobject.php.

Referenced by eZContentCacheManager\clearObjectViewCache(), eZContentObjectOperations\remove(), and eZContentClassOperations\remove().

static eZContentObject::expireComplexViewModeCache ( ) [static]

Sets all complex viewmode content cache files to be expired.

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 5449 of file ezcontentobject.php.

Referenced by eZContentCacheManager\clearObjectViewCache().

static eZContentObject::expireTemplateBlockCache ( ) [static]

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

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 5425 of file ezcontentobject.php.

Referenced by eZContentCacheManager\clearTemplateBlockCache(), and expireTemplateBlockCacheIfNeeded().

static eZContentObject::expireTemplateBlockCacheIfNeeded ( ) [static]

Callse eZContentObject::xpireTemplateBlockCache() unless template caching is disabled.

Definition at line 5437 of file ezcontentobject.php.

eZContentObject::eZContentObject ( row)

Definition at line 67 of file ezcontentobject.php.

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

static eZContentObject::fetch ( id,
asObject = true 
) [static]

Fetches a content object by ID.

Parameters:
int$idID of the content object to fetch
bool$asObjectReturn the result as an object (true) or an assoc. array (false)
Returns:
eZContentObject

Definition at line 782 of file ezcontentobject.php.

Referenced by eZObjectRelationListType\appendObject(), checkAccess(), checkGroupLimitationAccess(), classListFromPolicy(), eZContentCacheManager\clearTemplateBlockCache(), contentClass(), eZInformationCollectionAttribute\contentObject(), copyPublishContentObject(), createWithNodeAssignment(), eZObjectRelationListType\customObjectAttributeHTTPAction(), updateNodeAssignment\execute(), eZWaitUntilDateType\execute(), eZApproveType\execute(), eZMultiplexerType\execute(), fetchByRemoteID(), eZApproveType\fetchHTTPInput(), eZObjectRelationType\fromString(), eZObjectRelationListType\fromString(), eZContentObjectPackageHandler\generateFetchAliasArray(), eZContentCacheManager\generateObjectViewCache(), eZObjectRelationListType\handleCustomObjectHTTPActions(), importRSSItem(), eZObjectRelationListType\initializeObjectAttribute(), initialLanguage(), eZContentObjectPackageHandler\installSuspendedNodeAssignment(), eZObjectRelationListType\metaData(), eZContentCacheManager\nodeList(), eZContentCacheManager\nodeListForObject(), eZObjectRelationType\objectAttributeContent(), eZObjectRelationListType\onPublish(), owner(), parentNodes(), eZContentUpload\publishObject(), eZContentObjectOperations\remove(), eZObjectRelationType\removeContentObjectRelation(), removeThis(), removeTranslation(), eZSiteInstaller\renameContentObject(), eZObjectRelationType\serializeContentObjectAttribute(), eZObjectRelationListType\serializeContentObjectAttribute(), eZObjectRelationType\storeObjectAttribute(), eZObjectRelationListType\storeObjectAttribute(), eZObjectRelationListType\title(), eZXMLTextType\transformLinksToRemoteLinks(), unserialize(), eZSiteInstaller\updateContentObjectAttributes(), eZSiteInstaller\updateObjectAttributeFromString(), eZApproveType\validateGroupIDList(), eZObjectRelationListType\validateObjectAttributeHTTPInput(), eZApproveType\validateUserIDList(), and versionLanguageName().

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

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

Definition at line 585 of file ezcontentobject.php.

static eZContentObject::fetchByNodeID ( nodeID,
asObject = true 
) [static]

Fetches the contentobject which has a node with the ID $nodeID

Parameters:
$asObjectIf true return the as a PHP object, if false return the raw database data.

Definition at line 896 of file ezcontentobject.php.

Referenced by eZNodeAssignment\getParentObject(), eZContentCacheManager\nodeListForObject(), and eZContentObjectTreeNode\updateMainNodeID().

eZContentObject::fetchClassAttributes ( version = 0,
asObject = true 
)

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

See also:
attributes

Definition at line 4899 of file ezcontentobject.php.

Referenced by serialize().

eZContentObject::fetchDataMap ( version = false,
language = false 
)
Returns:
a map with all the content object attributes where the keys are the attribute identifiers.
See also:
eZContentObjectTreeNode::dataMap

Definition at line 526 of file ezcontentobject.php.

Referenced by dataMap(), and fetchInput().

static eZContentObject::fetchFilteredList ( conditions = null,
offset = false,
limit = false,
asObject = true 
) [static]

Definition at line 1037 of file ezcontentobject.php.

Referenced by allowedAssignSectionList(), and fetchSameClassList().

static eZContentObject::fetchIDArray ( idArray,
asObject = true 
) [static]

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

Parameters:
array$idArrayarray of content object ids
bool$asObjectWether to get the result as an array of eZContentObject or an array of associative arrays
Returns:
array(contentObjectID => eZContentObject|array) array of eZContentObject (if $asObject = true) or array of associative arrays (if $asObject = false)

Definition at line 964 of file ezcontentobject.php.

Referenced by eZXMLOutputHandler\prefetch().

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

Definition at line 2312 of file ezcontentobject.php.

static eZContentObject::fetchList ( asObject = true,
conditions = null,
offset = false,
limit = false 
) [static]
Returns:
An array with content objects.
Parameters:
$asObjectWhether to return objects or not
$conditionsOptional conditions to limit the fetch, set to null to skip it.
$offsetWhere to start fetch from, set to false to skip it.
$limitMaximum number of objects to fetch, set false to skip it.
See also:
fetchListCount

Definition at line 1024 of file ezcontentobject.php.

Referenced by allowedAssignSectionList(), eZContentCacheManager\clearContentCacheIfNeededBySectionID(), eZSiteInstaller\contentObjectByName(), translationList(), and translationStringList().

static eZContentObject::fetchListCount ( conditions = null) [static]
Returns:
The number of objects in the database. Optionally $conditions can be used to limit the list count.
See also:
fetchList

Definition at line 1053 of file ezcontentobject.php.

static eZContentObject::fetchObjectCountByUserID ( classID,
userID 
) [static]
Returns:
the number of objects of the given class is created by the given user.

Definition at line 5523 of file ezcontentobject.php.

static eZContentObject::fetchSameClassList ( contentClassID,
asObject = true,
offset = false,
limit = false 
) [static]
static eZContentObject::fetchSameClassListCount ( contentClassID) [static]
static eZContentObject::fillNodeListAttributes ( objList,
asObject = true 
) [static]

Fetches the attributes for an array of objects. The objList parameter contains an array of objects ( instanceOf eZContentObject or a object that is or extends eZContentObjectTreeNode ) to fetch attributes from.

Definition at line 2051 of file ezcontentobject.php.

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

static eZContentObject::fixReverseRelations ( objectID,
mode = false 
) [static]

Definition at line 1594 of file ezcontentobject.php.

Referenced by purge(), and removeThis().

eZContentObject::fixupInput ( contentObjectAttributes,
attributeDataBaseName 
)

Definition at line 2303 of file ezcontentobject.php.

eZContentObject::getVersionCount ( )

Returns number of exist versions.

Definition at line 2487 of file ezcontentobject.php.

Referenced by createNewVersion().

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

Definition at line 2387 of file ezcontentobject.php.

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

Definition at line 2371 of file ezcontentobject.php.

Referenced by fetchInput().

eZContentObject::hasContentAction ( name)
Returns:
true if the content action is in the content action list

Definition at line 4759 of file ezcontentobject.php.

Referenced by contentActionList().

eZContentObject::hasRemainingVersions ( )
Returns:
true if the object has any versions remaining.

Definition at line 1152 of file ezcontentobject.php.

eZContentObject::initialLanguage ( )

Definition at line 2521 of file ezcontentobject.php.

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

eZContentObject::initialLanguageCode ( )

Definition at line 2526 of file ezcontentobject.php.

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

eZContentObject::isAlwaysAvailable ( )

Definition at line 5752 of file ezcontentobject.php.

Referenced by copyVersion().

static eZContentObject::isCacheExpired ( timestamp) [static]
Returns:
if the content cache timestamp $timestamp is expired.

Definition at line 5460 of file ezcontentobject.php.

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

static eZContentObject::isComplexViewMode ( viewMode) [static]
Returns:
true if the viewmode is a complex viewmode.

Definition at line 5475 of file ezcontentobject.php.

Referenced by isComplexViewModeCacheExpired().

static eZContentObject::isComplexViewModeCacheExpired ( viewMode,
timestamp 
) [static]
Returns:
true if the viewmode is a complex viewmode and the viewmode timestamp is expired.

Definition at line 5485 of file ezcontentobject.php.

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

static eZContentObject::isObjectRelationTyped ( ) [static]

Definition at line 2772 of file ezcontentobject.php.

Referenced by relationTypeMask().

eZContentObject::languages ( )

Definition at line 4800 of file ezcontentobject.php.

Referenced by availableLanguages().

eZContentObject::linkedContentObjectCount ( fromObjectVersion = false)

Returns the xml-linked objects count.

Definition at line 3128 of file ezcontentobject.php.

eZContentObject::linkedContentObjectList ( fromObjectVersion = false,
fromObjectID = false 
)

Returns the xml-linked objects.

Definition at line 3009 of file ezcontentobject.php.

eZContentObject::mainNode ( )

Definition at line 3535 of file ezcontentobject.php.

eZContentObject::mainNodeID ( )

Returns the main node id for the current object.

Definition at line 3525 of file ezcontentobject.php.

eZContentObject::mainParentNodeID ( )

Definition at line 753 of file ezcontentobject.php.

static eZContentObject::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 4910 of file ezcontentobject.php.

Referenced by unserialize().

eZContentObject::matchIngroupIDList ( )

Get class groups this object's class belongs to if match for class groups is enabled.

Returns:
array of class group ids. False if match is disabled.

Definition at line 237 of file ezcontentobject.php.

eZContentObject::name ( version = false,
lang = false 
)

Definition at line 326 of file ezcontentobject.php.

eZContentObject::names ( )

Definition at line 346 of file ezcontentobject.php.

eZContentObject::nextVersion ( )

Returns the next available version number for this object.

Definition at line 2456 of file ezcontentobject.php.

Referenced by createNewVersion().

eZContentObject::owner ( )

Returns the owner of the object as a content object.

Definition at line 670 of file ezcontentobject.php.

eZContentObject::parentNodeIDArray ( )

Get parent node IDs

Definition at line 3391 of file ezcontentobject.php.

eZContentObject::parentNodes ( version = false,
asObject = true 
)
Parameters:
$versionNo longer in use, published nodes are used instead.
$asObjectIf true it fetches PHP objects, otherwise it fetches IDs.
Returns:
the parnet nodes for the current object.

Definition at line 3401 of file ezcontentobject.php.

Referenced by parentNodeIDArray().

eZContentObject::permissions ( )

Returns the permission for the current object.

Definition at line 3551 of file ezcontentobject.php.

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)

Definition at line 5255 of file ezcontentobject.php.

eZContentObject::previousVersion ( )

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

Definition at line 2468 of file ezcontentobject.php.

eZContentObject::publishContentObjectRelations ( version)

Definition at line 3314 of file ezcontentobject.php.

eZContentObject::purge ( )

If nodeID is not given, this function will remove object from database. All versions and translations of this object will be lost. Otherwise, it will check node assignment and only delete the object from this node if it was assigned to other nodes as well.

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 1662 of file ezcontentobject.php.

static eZContentObject::recursionProtect ( id) [static]
static eZContentObject::recursionProtectionEnd ( ) [static]

Definition at line 2428 of file ezcontentobject.php.

static eZContentObject::recursionProtectionStart ( ) [static]

Definition at line 2410 of file ezcontentobject.php.

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

Definition at line 3057 of file ezcontentobject.php.

eZContentObject::relatedContentObjectCount ( fromObjectVersion = false,
attributeID = 0,
params = false 
)
Returns:
the number of related objects
Parameters:
$attributeID: ( makes sense only when $params['AllRelations'] not set or eZContentObject::RELATION_ATTRIBUTE ) >0 - return relations made with attribute ID ( "related object(s)" datatype ) 0 or false ( $params['AllRelations'] is eZContentObject::RELATION_ATTRIBUTE )
  • return relations made with any attributes false ( $params['AllRelations'] not set )
  • return ALL relations (deprecated, use "$params['AllRelations'] = true" instead)
$params: other parameters from template fetch function : $params['AllRelations'] - relation type filter : true - return ALL relations, including attribute-level false - return object-level relations >0 - bit mask of EZ_CONTENT_OBJECT_RELATION_* values $params['SortBy'] - related objects sorting mode. Supported modes: class_identifier, class_name, modified, name, published, section $params['IgnoreVisibility'] - ignores 'hidden' state of related objects if true

Definition at line 3086 of file ezcontentobject.php.

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

Returns the related objects.

Parameters:
$attributeID: ( makes sense only when $params['AllRelations'] not set or eZContentObject::RELATION_ATTRIBUTE ) >0 - return relations made with attribute ID ( "related object(s)" datatype ) 0 or false ( $params['AllRelations'] is eZContentObject::RELATION_ATTRIBUTE )
  • return relations made with any attributes false ( $params['AllRelations'] not set )
  • return ALL relations (deprecated, use "$params['AllRelations'] = true" instead)
$groupByAttribute: false - return all relations as an array of content objects true - return all relations groupped by attribute ID This parameter makes sense only when $attributeID == false or $params['AllRelations'] = true
$params: other parameters from template fetch function : $params['AllRelations'] - relation type filter : true - return ALL relations, including attribute-level false - return object-level relations >0 - bit mask of EZ_CONTENT_OBJECT_RELATION_* values $params['SortBy'] - related objects sorting mode. Supported modes: class_identifier, class_name, modified, name, published, section $params['IgnoreVisibility'] - ignores 'hidden' state of related objects if true

Definition at line 2996 of file ezcontentobject.php.

Referenced by relatedContentObjectArray().

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

Fetch the number of (reverse) related objects.

Parameters:
int$version
int$attributeIDThis 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 | false$reverseRelatedObjectsWether to count related objects (false) or reverse related objects (false)
array | false$paramsVarious 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 3196 of file ezcontentobject.php.

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

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

Returns the related or reverse related objects:

Parameters:
$attributeID: ( makes sense only when $params['AllRelations'] not set or eZContentObject::RELATION_ATTRIBUTE ) >0 - return relations made with attribute ID ( "related object(s)" datatype ) 0 or false ( $params['AllRelations'] is eZContentObject::RELATION_ATTRIBUTE )
  • return relations made with any attributes false ( $params['AllRelations'] not set )
  • return ALL relations (deprecated, use "$params['AllRelations'] = true" instead)
$groupByAttribute: false - return all relations as an array of content objects true - return all relations groupped by attribute ID This parameter makes sense only when $attributeID == false or $params['AllRelations'] = true
$params: other parameters from template fetch function : $params['AllRelations'] - relation type filter : true - return ALL relations, including attribute-level false - return object-level relations >0 - bit mask of EZ_CONTENT_OBJECT_RELATION_* values $params['SortBy'] - related objects sorting mode. Supported modes: class_identifier, class_name, modified, name, published, section $params['IgnoreVisibility'] - ignores 'hidden' state of related objects if true
$reverseRelatedObjects: if "true" returns reverse related contentObjects if "false" returns related contentObjects

Definition at line 2825 of file ezcontentobject.php.

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

static eZContentObject::relationTypeMask ( allRelations = false) [static]

Definition at line 2785 of file ezcontentobject.php.

Referenced by relatedObjectCount(), and relatedObjects().

eZContentObject::remoteID ( )

Get remote id of content object

Definition at line 726 of file ezcontentobject.php.

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

Removes a link to the given content object id.

Parameters:
$toObjectIDIf false it will delete relations to all the objects.
$attributeIDID 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.
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 2662 of file ezcontentobject.php.

Referenced by commitInputRelations().

eZContentObject::removeReverseRelations ( objectID)

Definition at line 1619 of file ezcontentobject.php.

eZContentObject::removeThis ( nodeID = null)
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 1788 of file ezcontentobject.php.

eZContentObject::removeTranslation ( languageID)

Definition at line 5634 of file ezcontentobject.php.

static eZContentObject::removeVersions ( versionStatus = false) [static]
Deprecated:
This method is left here only for backward compatibility. Use eZContentObjectVersion::removeVersions() method instead.

Definition at line 5542 of file ezcontentobject.php.

eZContentObject::rename ( newName)

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

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

Definition at line 5552 of file ezcontentobject.php.

eZContentObject::resetDataMap ( )

Definition at line 574 of file ezcontentobject.php.

Referenced by __clone().

eZContentObject::resetInputRelationList ( )

Definition at line 2125 of file ezcontentobject.php.

Referenced by appendInputRelationList(), and validateInput().

eZContentObject::reverseEmbeddedObjectCount ( fromObjectVersion = false)

Returns the reverse xml-embedded objects count.

Definition at line 3161 of file ezcontentobject.php.

eZContentObject::reverseEmbeddedObjectList ( fromObjectVersion = false,
fromObjectID = false 
)

Returns the reverse xml-embedded objects.

Definition at line 3046 of file ezcontentobject.php.

eZContentObject::reverseLinkedObjectCount ( fromObjectVersion = false)

Returns the reverse xml-linked objects count.

Definition at line 3150 of file ezcontentobject.php.

eZContentObject::reverseLinkedObjectList ( fromObjectVersion = false,
fromObjectID = false 
)

Returns the reverse xml-linked objects.

Definition at line 3033 of file ezcontentobject.php.

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

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

Parameters:
$attributeID: ( makes sense only when $params['AllRelations'] not set or eZContentObject::RELATION_ATTRIBUTE ) >0 - return relations made with attribute ID ( "related object(s)" datatype ) 0 or false ( $params['AllRelations'] is eZContentObject::RELATION_ATTRIBUTE )
  • return relations made with any attributes false ( $params['AllRelations'] not set )
  • return ALL relations (deprecated, use "$params['AllRelations'] = true" instead)
$params: other parameters from template fetch function : $params['AllRelations'] - relation type filter : true - return ALL relations, including attribute-level false - return object-level relations >0 - bit mask of EZ_CONTENT_OBJECT_RELATION_* values

Definition at line 3300 of file ezcontentobject.php.

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

Returns the objects to which this object are related .

Parameters:
$attributeID: ( makes sense only when $params['AllRelations'] not set or eZContentObject::RELATION_ATTRIBUTE ) >0 - return relations made with attribute ID ( "related object(s)" datatype ) 0 or false ( $params['AllRelations'] is eZContentObject::RELATION_ATTRIBUTE )
  • return relations made with any attributes false ( $params['AllRelations'] not set )
  • return ALL relations (deprecated, use "$params['AllRelations'] = true" instead)
$groupByAttribute: false - return all relations as an array of content objects true - return all relations groupped by attribute ID This parameter makes sense only when $attributeID == false or $params['AllRelations'] = true
$params: other parameters from template fetch function : $params['AllRelations'] - relation type filter : true - return ALL relations, including attribute-level false - return object-level relations >0 - bit mask of EZ_CONTENT_OBJECT_RELATION_* values $params['SortBy'] - related objects sorting mode. Supported modes: class_identifier, class_name, modified, name, published, section $params['IgnoreVisibility'] - ignores 'hidden' state of related objects if true

Definition at line 3117 of file ezcontentobject.php.

Referenced by contentObjectListRelatingThis(), and removeReverseRelations().

eZContentObject::revertTo ( version)

Reverts the object to the given version. All versions newer then the given version will be deleted.

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 1550 of file ezcontentobject.php.

eZContentObject::serialize ( package,
specificVersion = false,
options = false,
contentNodeIDArray = false,
topNodeIDArray = false 
)
Returns:
a DOM structure of the content object and it's attributes.
Parameters:
package
Contentobject version, true for current version, false for all, else array containing specific versions.
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.

Definition at line 5275 of file ezcontentobject.php.

eZContentObject::setAlwaysAvailableLanguageID ( languageID,
version = false 
)

Definition at line 5757 of file ezcontentobject.php.

eZContentObject::setCachedName ( name)

Sets the name of the object, in memory only. Use setName() to change it.

Definition at line 438 of file ezcontentobject.php.

eZContentObject::setClassName ( name)

Definition at line 4853 of file ezcontentobject.php.

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

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

Definition at line 2040 of file ezcontentobject.php.

eZContentObject::setCurrentLanguage ( lang)

Definition at line 2515 of file ezcontentobject.php.

static eZContentObject::setDefaultLanguage ( lang) [static]

Set default language. Checks if default language is valid.

Parameters:
defaultlanguage.
Note:
Deprecated.

Definition at line 4845 of file ezcontentobject.php.

eZContentObject::setName ( objectName,
versionNum = false,
languageCode = false 
)

Sets the name of the object in all translations.

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 448 of file ezcontentobject.php.

eZContentObject::setPermissions ( permissionArray)

Sets the permissions for this object.

Definition at line 3543 of file ezcontentobject.php.

eZContentObject::stateIDArray ( refreshCache = false)

Gets the current states of the content object.

Uses a member variable that caches the result.

Returns:
array an associative array with state group id => state id pairs
Parameters:
boolean$refreshCacheif the cache in the member variable needs to be refreshed

Definition at line 5983 of file ezcontentobject.php.

Referenced by assignState().

eZContentObject::stateIdentifierArray ( )

Definition at line 6008 of file ezcontentobject.php.

eZContentObject::store ( fieldFilters = null)

Store the object

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.

Reimplemented from eZPersistentObject.

Definition at line 254 of file ezcontentobject.php.

Referenced by removeThis(), removeTranslation(), revertTo(), serialize(), and setAlwaysAvailableLanguageID().

eZContentObject::storeInput ( contentObjectAttributes,
attributeInputMap 
)
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 2437 of file ezcontentobject.php.

eZContentObject::storeNodeModified ( )

Update all nodes to set modified_subnode value

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 310 of file ezcontentobject.php.

Referenced by store().

static eZContentObject::translationList ( ) [static]
Returns:
an array with locale objects, these objects represents the languages the content objects are allowed to be translated into.
Note:
the setting ContentSettings/TranslationList in site.ini determines the array.
See also:
translationStringList

Definition at line 4881 of file ezcontentobject.php.

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

static eZContentObject::translationStringList ( ) [static]
Returns:
an array with locale strings, these strings represents the languages which content objects are allowed to be translated into.
Note:
the setting ContentSettings/TranslationList in site.ini determines the array.
See also:
translationList

Definition at line 4863 of file ezcontentobject.php.

static eZContentObject::unserialize ( package,
domNode,
&$  options,
ownerID = false,
handlerType = 'ezcontentobject' 
) [static]

Unserialize xml structure. Create object from xml input.

Parameters:
package
XMLDOM Node
parentnode object.
Options
ownerID, override owner ID, null to use XML owner id (optional)
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 4933 of file ezcontentobject.php.

Referenced by checkAccess(), classListFromPolicy(), and eZContentObjectPackageHandler\installContentObjects().

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

Definition at line 2180 of file ezcontentobject.php.

eZContentObject::version ( version,
asObject = true 
)

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

Definition at line 1095 of file ezcontentobject.php.

Referenced by createNewVersion(), and serialize().

eZContentObject::versionLanguageName ( version,
lang = false 
)

Definition at line 362 of file ezcontentobject.php.

Referenced by name().

eZContentObject::versions ( asObject = true,
parameters = array() 
)
Returns:
an array of versions for the current object.

Definition at line 1124 of file ezcontentobject.php.

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


Member Data Documentation

eZContentObject::$ClassIdentifier

Cached class identifier.

Definition at line 6101 of file ezcontentobject.php.

eZContentObject::$ClassName

Stores the current class name.

Definition at line 6098 of file ezcontentobject.php.

eZContentObject::$ContentActionList = false

Contains an array of the content object actions for the current object.

Definition at line 6107 of file ezcontentobject.php.

eZContentObject::$ContentObjectAttributes = array()

Contains a cached version of the content object attributes for the given version and language.

Definition at line 6110 of file ezcontentobject.php.

eZContentObject::$CurrentLanguage

Stores the current language.

Definition at line 6095 of file ezcontentobject.php.

eZContentObject::$DataMap = array()

Contains the datamap for content object attributes.

Definition at line 6104 of file ezcontentobject.php.

eZContentObject::$ID

Definition at line 6091 of file ezcontentobject.php.

eZContentObject::$InputRelationList = array()

Contains the arrays of relatedobject id by fetching input for this object.

Definition at line 6116 of file ezcontentobject.php.

eZContentObject::$MainNodeID = false

Contains the main node id for this object.

Definition at line 6113 of file ezcontentobject.php.

eZContentObject::$Name

Definition at line 6092 of file ezcontentobject.php.

eZContentObject::$StateIDArray = false [private]

Definition at line 6124 of file ezcontentobject.php.

Definition at line 48 of file ezcontentobject.php.

Definition at line 56 of file ezcontentobject.php.

Referenced by eZContentObjectTreeNode\unserialize().

Definition at line 54 of file ezcontentobject.php.

Definition at line 55 of file ezcontentobject.php.

Definition at line 46 of file ezcontentobject.php.

Referenced by removeThis().


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