eZ Publish  [trunk]
eZNodeAssignment Class Reference

The class eZNodeAssignment does. More...

+ Inheritance diagram for eZNodeAssignment:
+ Collaboration diagram for eZNodeAssignment:

List of all members.

Public Member Functions

 cloneNodeAssignment ($nextVersionNumber=1, $contentObjectID=false)
 eZNodeAssignment ($row)
 fetchNode ()
 getParentNode ()
 getParentObject ()
 isCreateOperation ()
 isMoveOperation ()
 isNopOperation ()
 isRemoveOperation ()
 isSetOperation ()
 name ()
 purge ($parentNodeID=false, $contentObjectID=false)
 remove ($parentNodeID=false, $contentObjectID=false)
 setName ($name)
 tempNode ()

Static Public Member Functions

static create ($parameters=array())
static definition ()
 Returns the definition for the object, the default implementation is to return an empty array.
static fetch ($contentObjectID, $version=1, $parentNode=0, $asObject=true)
static fetchByID ($id, $asObject=true)
static fetchChildCountByVersionStatus ($parentNodeIDList, $status=eZContentObjectVersion::STATUS_PENDING)
 Fetch node assignment count by version status, giving parent node id list.
static fetchChildListByVersionStatus ($parentNodeIDList, $status=eZContentObjectVersion::STATUS_PENDING, $asObject=true)
 Fetch node assignment list by version status, giving parent node id list.
static fetchForObject ($contentObjectID, $version=1, $main=0, $asObject=true)
static fetchListByID ($idList, $asObject=true)
static purgeByID ($assignmentID)
static removeByID ($assignmentID)
static setNewMainAssignment ($objectID, $version)

Public Attributes

 $ContentobjectID
 $ContentObjectVersion
 $FromNodeID
 $ID
 $Main
 $ParentNode
 $ParentRemoteID
 $RemoteID
 Used for giving unique values to an assignment which can later be checked.
 $SortField
 $SortOrder
const OP_CODE_CREATE = 3
const OP_CODE_CREATE_NOP = 2
const OP_CODE_EXECUTE = 1
const OP_CODE_MOVE = 5
const OP_CODE_MOVE_NOP = 4
const OP_CODE_NOP = 0
const OP_CODE_REMOVE = 7
const OP_CODE_REMOVE_NOP = 6
const OP_CODE_SET = 9
const OP_CODE_SET_NOP = 8

Detailed Description

The class eZNodeAssignment does.

Definition at line 16 of file eznodeassignment.php.


Member Function Documentation

eZNodeAssignment::cloneNodeAssignment ( nextVersionNumber = 1,
contentObjectID = false 
)

Definition at line 489 of file eznodeassignment.php.

static eZNodeAssignment::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: 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" ); }

Returns:
array

Reimplemented from eZPersistentObject.

Definition at line 45 of file eznodeassignment.php.

Referenced by checkNodeMovements(), fetch(), fetchByID(), fetchForObject(), fetchListByID(), eZContentObjectPackageHandler\installSuspendedNodeAssignment(), remove(), and eZContentObjectTreeNode\unserialize().

Constructor

Definition at line 38 of file eznodeassignment.php.

Referenced by create(), and fetchChildListByVersionStatus().

static eZNodeAssignment::fetch ( contentObjectID,
version = 1,
parentNode = 0,
asObject = true 
) [static]
static eZNodeAssignment::fetchByID ( id,
asObject = true 
) [static]

Fetches the node assignment which has id $id and returns it.

See also:
fetchListByID

Definition at line 410 of file eznodeassignment.php.

static eZNodeAssignment::fetchChildCountByVersionStatus ( parentNodeIDList,
status = eZContentObjectVersion::STATUS_PENDING 
) [static]

Fetch node assignment count by version status, giving parent node id list.

Parameters:
array$parentNodeIDList
int$status
Returns:
int

Definition at line 437 of file eznodeassignment.php.

Referenced by eZContentObjectTreeNode\removeSubtrees().

static eZNodeAssignment::fetchChildListByVersionStatus ( parentNodeIDList,
status = eZContentObjectVersion::STATUS_PENDING,
asObject = true 
) [static]

Fetch node assignment list by version status, giving parent node id list.

Parameters:
array$idListnode id array
int$statusstatus of the object version
boolean$count
boolean$asObjectvalid only when $count is false
Returns:
array|int

Definition at line 460 of file eznodeassignment.php.

static eZNodeAssignment::fetchListByID ( idList,
asObject = true 
) [static]

Fetches all node assignments which is mentioned in array $ID and returns it.

See also:
fetchByID

Definition at line 422 of file eznodeassignment.php.

Finds the node for the current assignemnt if it exists and returns it.

Returns:
An eZContentObjectTreeNode object or null if no node was found.
See also:
eZContentObjectTreeNode::fetchNode

Definition at line 401 of file eznodeassignment.php.

Definition at line 504 of file eznodeassignment.php.

Returns:
The contentobject which the parent node points to.

Definition at line 512 of file eznodeassignment.php.

Returns true if the assignment is a create operation.

Returns:
bool

Definition at line 152 of file eznodeassignment.php.

Returns true if the assignment is a move operation.

Returns:
bool

Definition at line 161 of file eznodeassignment.php.

Returns true if the assignment is a nop (no operation) operation.

Returns:
bool

Definition at line 143 of file eznodeassignment.php.

Returns true if the assignment is a remove operation.

Returns:
bool

Definition at line 170 of file eznodeassignment.php.

Returns true if the assignment is a set (update/create) operation.

Returns:
bool

Definition at line 179 of file eznodeassignment.php.

Definition at line 134 of file eznodeassignment.php.

eZNodeAssignment::purge ( parentNodeID = false,
contentObjectID = false 
)

Delete specified nodeassignment if parentNodeID and contentObjectID are given, if they are false it will remove the current node assignment.

Parameters:
$parentNodeIDThe ID of the parent node
$contentObjectIDThe ID of 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.

Definition at line 312 of file eznodeassignment.php.

static eZNodeAssignment::purgeByID ( assignmentID) [static]

Delelet the node assignment with the ID $assignmentID.

Parameters:
$assignmentIDEither an ID or an array with IDs.
Returns:
true if it were able to remove the assignments, false if something failed.
Note:
If $assignmentID is an empty array it immediately returns false.
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 340 of file eznodeassignment.php.

Referenced by copyPublishContentObject(), eZContentOperationCollection\removeAssignment(), eZContentOperationCollection\removeNodes(), and eZContentOperationCollection\removeOldNodes().

eZNodeAssignment::remove ( parentNodeID = false,
contentObjectID = false 
)

Marks the specified nodeassignment to remove its node. It uses parentNodeID and contentObjectID if they are given, if they are false it will mark the current node assignment.

Parameters:
$parentNodeIDThe ID of the parent node
$contentObjectIDThe ID of 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 243 of file eznodeassignment.php.

static eZNodeAssignment::removeByID ( assignmentID) [static]

Marks the node assignment with the ID $assignmentID to remove its node.

Parameters:
$assignmentIDEither an ID or an array with IDs.
Returns:
true if it were able to remove the assignments, false if something failed.
Note:
If $assignmentID is an empty array it immediately returns false.
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 275 of file eznodeassignment.php.

Referenced by checkNodeActions().

Definition at line 129 of file eznodeassignment.php.

static eZNodeAssignment::setNewMainAssignment ( objectID,
version 
) [static]

Chooses and sets new main assignment for the specified object, in case if there's main assignment already.

Returns:
false if there is already main assignment, true on success.
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 524 of file eznodeassignment.php.

Referenced by checkNodeActions(), and eZContentObject\unserialize().

Definition at line 115 of file eznodeassignment.php.


Member Data Documentation

eZNodeAssignment::$ContentobjectID

Definition at line 573 of file eznodeassignment.php.

eZNodeAssignment::$ContentObjectVersion

Definition at line 574 of file eznodeassignment.php.

eZNodeAssignment::$FromNodeID

Definition at line 579 of file eznodeassignment.php.

eZNodeAssignment::$ID

Definition at line 568 of file eznodeassignment.php.

eZNodeAssignment::$Main

Definition at line 578 of file eznodeassignment.php.

eZNodeAssignment::$ParentNode

Definition at line 575 of file eznodeassignment.php.

eZNodeAssignment::$ParentRemoteID

Definition at line 572 of file eznodeassignment.php.

eZNodeAssignment::$RemoteID

Used for giving unique values to an assignment which can later be checked.

This is often used in templates to provide limited choices for assignments.

Definition at line 571 of file eznodeassignment.php.

eZNodeAssignment::$SortField

Definition at line 576 of file eznodeassignment.php.

eZNodeAssignment::$SortOrder

Definition at line 577 of file eznodeassignment.php.

Definition at line 23 of file eznodeassignment.php.

Referenced by eZContentObject\addLocation().

Definition at line 26 of file eznodeassignment.php.

Definition at line 32 of file eznodeassignment.php.


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