eZContentObject Class Reference
[Kernel system]
Handles Exponential content objects.
More...
Inheritance diagram for eZContentObject:
List of all members.
|
Public Methods |
| & | definition () |
| & | attribute ($attr) |
| & | dataMap () |
| & | fetchDataMap ($version=false,$language=false) |
| & | owner () |
| & | contentClassIdentifier () |
| & | contentClass () |
| & | currentVersion ($asObject=true) |
| | version ($version,$asObject=true) |
| | versions ($asObject=true) |
| & | createNewVersion ($copyFromVersion=false) |
| & | copyVersion (&$object,&$version,$newVersionNumber,$contentObjectID=false,$status=EZ_VERSION_STATUS_DRAFT) |
| & | create ($name,$contentclassID,$userID,$sectionID=1,$version=1) |
| & | clone () |
| & | copy ($allVersions=true) |
| | revertTo ($version) |
| | copyRevertTo ($version) |
| | purge ($id=false) |
| | remove ($id=false,$nodeID=null) |
| & | contentObjectAttributes ($asObject=true,$version=false,$language=false) |
| | setContentObjectAttributes (&$attributes,$version,$language) |
| & | parents () |
| | nextVersion () |
| | getVersionCount () |
| | addContentObjectRelation ($objectID,$version) |
| | removeContentObjectRelation ($objectID,$version=null) |
| & | relatedContentObjectCount ($version=false,$objectID=false) |
| & | relatedContentObjectArray ($version=false,$objectID=false) |
| & | reverseRelatedObjectList ($version=false,$objectID=false) |
| & | contentObjectListRelatingThis ($version=false,$objectID=false) |
| & | parentNodes ($version=false,$asObject=true) |
| & | assignedNodes ($asObject=true) |
| | setPermissions ($permissionArray) |
| | permissions () |
| | canRead () |
| & | contentActionList () |
| | hasContentAction ($name) |
| | translationStringList () |
| & | translationList () |
| & | serialize ($specificVersion=false) |
| | cacheInfo ($Params) |
| | expireAllCache () |
| | expireComplexViewModeCache () |
| | isCacheExpired ($timestamp) |
| | isComplexViewMode ($viewMode) |
| | isComplexViewModeCacheExpired ($viewMode,$timestamp) |
Static Public Methods |
| & | fillNodeListAttributes (&$nodeList,$asObject=true) |
| & | fetchClassAttributes ($version=0,$asObject=true) |
Public Attributes |
|
| CurrentLanguage |
| | Stores the current language.
|
|
| ClassName |
| | Stores the current permissions.
|
|
| DataMap = array() |
| | Contains the datamap for content object attributes.
|
|
| 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.
|
Detailed Description
Handles Exponential content objects.
It encapsulates the date for an object and provides lots of functions for dealing with versions, translations and attributes.
- See also:
-
eZContentClass
Definition at line ezcontentobject.php.
Member Function Documentation
| eZContentObject::addContentObjectRelation |
( |
$ |
objectID, |
|
|
$ |
version |
|
) |
|
|
| & eZContentObject::assignedNodes |
( |
$ |
asObject = true |
) |
|
|
| & eZContentObject::attribute |
( |
$ |
attr |
) |
|
|
|
|
- Returns:
-
the attribute data for $attr, this is either returned from the member variables or a member function depending on whether the definition field or function attributes matched.
Reimplemented from eZPersistentObject.
Definition at line ezcontentobject.php.
References versions().
Referenced by parentNodes(). |
| eZContentObject::cacheInfo |
( |
$ |
Params |
) |
|
|
| eZContentObject::canRead |
( |
|
) |
|
|
| & eZContentObject::clone |
( |
|
) |
|
|
|
|
- Returns:
-
a new clone of the current object which has is ready to be stored with a new ID.
Definition at line ezcontentobject.php.
Referenced by copy(). |
| & eZContentObject::contentActionList |
( |
|
) |
|
|
| & eZContentObject::contentClass |
( |
|
) |
|
|
| & eZContentObject::contentClassIdentifier |
( |
|
) |
|
|
| & eZContentObject::contentObjectAttributes |
( |
$ |
asObject = true, |
|
|
$ |
version = false, |
|
|
$ |
language = false |
|
) |
|
|
| & eZContentObject::contentObjectListRelatingThis |
( |
$ |
version = false, |
|
|
$ |
objectID = false |
|
) |
|
|
| & eZContentObject::copy |
( |
$ |
allVersions = true |
) |
|
|
| eZContentObject::copyRevertTo |
( |
$ |
version |
) |
|
|
| & eZContentObject::copyVersion |
( |
&$ |
object, |
|
|
&$ |
version, |
|
|
$ |
newVersionNumber, |
|
|
$ |
contentObjectID = false, |
|
|
$ |
status = EZ_VERSION_STATUS_DRAFT |
|
) |
|
|
| & eZContentObject::create |
( |
$ |
name, |
|
|
$ |
contentclassID, |
|
|
$ |
userID, |
|
|
$ |
sectionID = 1, |
|
|
$ |
version = 1 |
|
) |
|
|
| & eZContentObject::createNewVersion |
( |
$ |
copyFromVersion = false |
) |
|
|
| & eZContentObject::currentVersion |
( |
$ |
asObject = true |
) |
|
|
| & eZContentObject::dataMap |
( |
|
) |
|
|
| & eZContentObject::definition |
( |
|
) |
|
|
|
|
- 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: 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 ezcontentobject.php.
References versions(). |
| eZContentObject::expireAllCache |
( |
|
) |
|
|
| eZContentObject::expireComplexViewModeCache |
( |
|
) |
|
|
| & eZContentObject::fetchClassAttributes |
( |
$ |
version = 0, |
|
|
$ |
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
Definition at line ezcontentobject.php.
References version().
Referenced by serialize(). |
| & eZContentObject::fetchDataMap |
( |
$ |
version = false, |
|
|
$ |
language = false |
|
) |
|
|
| & eZContentObject::fillNodeListAttributes |
( |
&$ |
nodeList, |
|
|
$ |
asObject = true |
|
) |
[static] |
|
|
|
Fetches the attributes for an array of objects. The objectList parameter contains an array of object id's , versions and language to fetch attributes from.
Definition at line ezcontentobject.php.
References version(). |
| eZContentObject::getVersionCount |
( |
|
) |
|
|
| eZContentObject::hasContentAction |
( |
$ |
name |
) |
|
|
| eZContentObject::isCacheExpired |
( |
$ |
timestamp |
) |
|
|
| eZContentObject::isComplexViewMode |
( |
$ |
viewMode |
) |
|
|
| eZContentObject::isComplexViewModeCacheExpired |
( |
$ |
viewMode, |
|
|
$ |
timestamp |
|
) |
|
|
| eZContentObject::nextVersion |
( |
|
) |
|
|
| & eZContentObject::owner |
( |
|
) |
|
|
| & eZContentObject::parentNodes |
( |
$ |
version = false, |
|
|
$ |
asObject = true |
|
) |
|
|
| & eZContentObject::parents |
( |
|
) |
|
|
| eZContentObject::permissions |
( |
|
) |
|
|
| eZContentObject::purge |
( |
$ |
id = false |
) |
|
|
|
|
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.
Definition at line ezcontentobject.php.
References eZDB::instance(). |
| & eZContentObject::relatedContentObjectArray |
( |
$ |
version = false, |
|
|
$ |
objectID = false |
|
) |
|
|
| & eZContentObject::relatedContentObjectCount |
( |
$ |
version = false, |
|
|
$ |
objectID = false |
|
) |
|
|
| eZContentObject::remove |
( |
$ |
id = false, |
|
|
$ |
nodeID = null |
|
) |
|
|
|
|
Removes the object from the database, it will use the keys in the object definition to figure out which table row should be removed unless $conditions is defined as an array with fieldnames. It uses removeObject to do the real job and passes the object defintion, conditions and extra conditions $extraConditions to this function.
Reimplemented from eZPersistentObject.
Definition at line ezcontentobject.php.
References eZSearch::removeObject(). |
| eZContentObject::removeContentObjectRelation |
( |
$ |
objectID, |
|
|
$ |
version = null |
|
) |
|
|
| & eZContentObject::reverseRelatedObjectList |
( |
$ |
version = false, |
|
|
$ |
objectID = false |
|
) |
|
|
| eZContentObject::revertTo |
( |
$ |
version |
) |
|
|
|
|
Reverts the object to the given version. All versions newer then the given version will be deleted.
Definition at line ezcontentobject.php.
References version(). |
| & eZContentObject::serialize |
( |
$ |
specificVersion = false |
) |
|
|
| eZContentObject::setContentObjectAttributes |
( |
&$ |
attributes, |
|
|
$ |
version, |
|
|
$ |
language |
|
) |
|
|
|
|
Initializes the cached copy of the content object attributes for the given version and language
Definition at line ezcontentobject.php.
References version(). |
| eZContentObject::setPermissions |
( |
$ |
permissionArray |
) |
|
|
| & eZContentObject::translationList |
( |
|
) |
|
|
| eZContentObject::translationStringList |
( |
|
) |
|
|
|
|
- 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 ezcontentobject.php.
References translationList().
Referenced by translationList(). |
| eZContentObject::version |
( |
$ |
version, |
|
|
$ |
asObject = true |
|
) |
|
|
| eZContentObject::versions |
( |
$ |
asObject = true |
) |
|
|
The documentation for this class was generated from the following file:
|