eZPublish  4.5
eZNodeAssignment Class Reference

The class eZNodeAssignment does. More...

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

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 ()
 
- Public Member Functions inherited from eZPersistentObject
 attribute ($attr, $noFunction=false)
 
 attributes ()
 
 eZPersistentObject ($row)
 
 fill ($row)
 
 hasAttribute ($attr)
 
 hasDirtyData ()
 
 remove ($conditions=null, $extraConditions=null)
 
 setAttribute ($attr, $val)
 
 setHasDirtyData ($hasDirtyData)
 
 store ($fieldFilters=null)
 
 sync ($fieldFilters=null)
 

Static Public Member Functions

static create ($parameters=array())
 
static definition ()
 
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. More...
 
static fetchChildListByVersionStatus ($parentNodeIDList, $status=eZContentObjectVersion::STATUS_PENDING, $asObject=true)
 Fetch node assignment list by version status, giving parent node id list. More...
 
static fetchForObject ($contentObjectID, $version=1, $main=0, $asObject=true)
 
static fetchListByID ($idList, $asObject=true)
 
static purgeByID ($assignmentID)
 
static removeByID ($assignmentID)
 
static setNewMainAssignment ($objectID, $version)
 
- Static Public Member Functions inherited from eZPersistentObject
static conditionText ($conditions)
 
static conditionTextByRow ($conditions, $row)
 
static count ($def, $conds=null, $field=null)
 
static definition ()
 
static escapeArray ($array)
 
static fetchObject ($def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
 
static fetchObjectList ($def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null, $custom_tables=null, $custom_conds=null)
 
static getShortAttributeName ($db, $def, $attrName)
 
static handleRows ($rows, $class_name, $asObject)
 
static newObjectOrder ($def, $orderField, $conditions)
 
static removeObject ($def, $conditions=null, $extraConditions=null)
 
static reorderObject ($def, $orderField, $conditions, $down=true)
 
static swapRow ($table, $keys, $order_id, $rows, $id1, $id2)
 
static updateObjectList ($parameters)
 

Public Attributes

 $ContentobjectID
 
 $ContentObjectVersion
 
 $FromNodeID
 
 $ID
 
 $Main
 
 $ParentNode
 
 $ParentRemoteID
 
 $RemoteID
 Used for giving unique values to an assignment which can later be checked. More...
 
 $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
 
- Public Attributes inherited from eZPersistentObject
 $PersistentDataDirty
 Whether the data is dirty, ie needs to be stored, or not. More...
 

Detailed Description

The class eZNodeAssignment does.

Member Function Documentation

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

Constructor

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
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

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
static eZNodeAssignment::fetchListByID (   $idList,
  $asObject = true 
)
static

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

See Also
fetchByID
eZNodeAssignment::fetchNode ( )

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
eZNodeAssignment::getParentNode ( )
eZNodeAssignment::getParentObject ( )
Returns
The contentobject which the parent node points to.
eZNodeAssignment::isCreateOperation ( )

Returns true if the assignment is a create operation.

Returns
bool
eZNodeAssignment::isMoveOperation ( )

Returns true if the assignment is a move operation.

Returns
bool
eZNodeAssignment::isNopOperation ( )

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

Returns
bool
eZNodeAssignment::isRemoveOperation ( )

Returns true if the assignment is a remove operation.

Returns
bool
eZNodeAssignment::isSetOperation ( )

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

Returns
bool
eZNodeAssignment::name ( )
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.
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.

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.
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.

Referenced by checkNodeActions().

eZNodeAssignment::setName (   $name)
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.

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

eZNodeAssignment::tempNode ( )

Member Data Documentation

eZNodeAssignment::$ContentobjectID
eZNodeAssignment::$ContentObjectVersion
eZNodeAssignment::$FromNodeID
eZNodeAssignment::$ID
eZNodeAssignment::$Main
eZNodeAssignment::$ParentNode
eZNodeAssignment::$ParentRemoteID
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.

eZNodeAssignment::$SortField
eZNodeAssignment::$SortOrder
const eZNodeAssignment::OP_CODE_CREATE = 3
const eZNodeAssignment::OP_CODE_CREATE_NOP = 2
const eZNodeAssignment::OP_CODE_EXECUTE = 1
const eZNodeAssignment::OP_CODE_MOVE_NOP = 4
const eZNodeAssignment::OP_CODE_NOP = 0
const eZNodeAssignment::OP_CODE_REMOVE_NOP = 6
const eZNodeAssignment::OP_CODE_SET = 9
const eZNodeAssignment::OP_CODE_SET_NOP = 8

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