Exponential 6.0.13 Exponential Enterprise Open Source CMS - PHP Class Reference

Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
eZNodeAssignment Class Reference

The class eZNodeAssignment does. More...

Inheritance diagram for eZNodeAssignment:

## Public Member Functions
| __construct ( $row)
| tempNode ()
| setName ( $name)
| name ()
| isNopOperation ()
| isCreateOperation ()
| isMoveOperation ()
| isRemoveOperation ()
| isSetOperation ()
| remove ( $parentNodeID=false, $contentObjectID=false)
| purge ( $parentNodeID=false, $contentObjectID=false)
| fetchNode ()
| cloneNodeAssignment ( $nextVersionNumber=1, $contentObjectID=false)
| getParentNode ()
| getParentObject ()
Public Member Functions inherited from eZPersistentObject
| eZPersistentObject ( $row=null)
| fill ( $row)
| store ( $fieldFilters=null)
| sync ( $fieldFilters=null)
| attributes ()
| hasAttribute ( $attr)
| attribute ( $attr, $noFunction=false)
| setAttribute ( $attr, $val)
| hasDirtyData ()
| setHasDirtyData ( $hasDirtyData)

## Static Public Member Functions
static | definition ()
static | create ( $parameters=array())
static | removeByID ( $assignmentID)
static | purgeByParentAndContentObjectID ( $parentNodeID, $contentObjectID)
static | purgeByID ( $assignmentID)
static | fetchForObject ( $contentObjectID, $version=1, $main=0, $asObject=true)
static | fetch ( $contentObjectID, $version=1, $parentNode=0, $asObject=true)
static | fetchByID ( $id, $asObject=true)
static | fetchListByID ( $idList, $asObject=true)
static | fetchChildCountByVersionStatus ( $parentNodeIDList, $status=eZContentObjectVersion::STATUS_PENDING)
static | fetchChildListByVersionStatus ( $parentNodeIDList, $status=eZContentObjectVersion::STATUS_PENDING, $asObject=true)
static | setNewMainAssignment ( $objectID, $version)
Static Public Member Functions inherited from eZPersistentObject
static | replaceFieldsWithShortNames (eZDBInterface $db, array $fieldDefs, &$fields)
static | count ( $def, $conds=null, $field=null)
static | fetchObject ( $def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
static | removeObject ( $def, $conditions=null, $extraConditions=null)
static | storeObject ( $obj, $fieldFilters=null)
static | conditionText ( $conditions)
static | conditionTextByRow ( $conditions, $row)
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 | handleRows ( $rows, $class_name, $asObject)
static | swapRow ( $table, $keys, $order_id, $rows, $id1, $id2)
static | newObjectOrder ( $def, $orderField, $conditions)
static | reorderObject ( $def, $orderField, $conditions, $down=true)
static | escapeArray ( $array)
static | updateObjectList ( $parameters)
static | getShortAttributeName ( $db, $def, $attrName)

## Public Attributes
| $TempNode
| $OpCode
const | OP_CODE_NOP = 0
const | OP_CODE_EXECUTE = 1
const | OP_CODE_CREATE_NOP = 2
const | OP_CODE_CREATE = 3
const | OP_CODE_MOVE_NOP = 4
const | OP_CODE_MOVE = 5
const | OP_CODE_REMOVE_NOP = 6
const | OP_CODE_REMOVE = 7
const | OP_CODE_SET_NOP = 8
const | OP_CODE_SET = 9
| $ID
| $RemoteID
| $ParentRemoteID
| $ContentobjectID
| $ContentObjectVersion
| $ParentNode
| $SortField
| $SortOrder
| $Main
| $FromNodeID
| $Hidden
| $Priority
Public Attributes inherited from eZPersistentObject
| $PersistentDataDirty
| $ID
| $ContentObjectID
| $SectionID
| $OwnerID
| $ClassID
| $Published
| $Modified
| $CurrentVersion
| $Status
| $RemoteID
| $LanguageMask
| $InitialLanguageID
| $NodeID
| $ParentNodeID
| $MainNodeID
| $ContentObjectVersion
| $ContentObjectIsPublished
| $Depth
| $SortField
| $SortOrder
| $Priority
| $ModifiedSubNode
| $PathString
| $PathIdentificationString
| $IsHidden
| $IsInvisible
| $UserID
| $Name
| $Locale
| $Identifier
| $NavigationPartIdentifier
| $SerializedDescriptionList
| $URLAliasName
| $AlwaysAvailable
| $CanTranslate
| $DataInt1
| $DataInt2
| $DataInt3
| $DataInt4
| $DataFloat1
| $DataFloat2
| $DataFloat3
| $DataFloat4
| $DataText1
| $DataText2
| $DataText3
| $DataText4
| $DataText5
| $SerializedDataText
| $Category
| $PolicyID
| $Values
| $Created
| $CurrencyCode
| $ProductCollectionID
| $ItemCount
| $Price
| $IsVATIncluded
| $VATValue
| $DiscountValue
| $Email
| $IsTemporary
| $IsArchived
| $IsActive
| $OrderID
| $ModifierID
| $Code
| $Symbol
| $AutoRateValue
| $CustomRateValue
| $RateFactor
| $Main
| $MementoKey
| $MainKey
| $WorkflowEventPos
| $LanguageID
| $ContentObjectStateGroupID
| $contentobject_attribute_id
| $contentobject_id
| $rating
| $rating_count
| $rating_average

## Additional Inherited Members
Static Protected Member Functions inherited from eZPersistentObject
static | replaceFieldsWithLongNames (eZDBInterface $db, array $fieldDefs, &$fields)

## Detailed Description

The class eZNodeAssignment does.

Definition at line 16 of file eznodeassignment.php.

## Constructor & Destructor Documentation

## ◆ __construct()

eZNodeAssignment::__construct | ( |  | $row | ) |

Initializes the object with the $row.

It will try to set each field taken from the database row. Calls fill to do the job. If $row is an integer, it will try to fetch it from the database using it as the unique ID.

Parameters

  int | array | $row |

Reimplemented from eZPersistentObject.

Definition at line 37 of file eznodeassignment.php.

## Member Function Documentation

## ◆ cloneNodeAssignment()

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

Definition at line 513 of file eznodeassignment.php.

References eZPersistentObject\attribute(), and create().

## ◆ create()

static eZNodeAssignment::create | ( |  | $parameters = `array()` | ) |
| static

Definition at line 193 of file eznodeassignment.php.

References eZRemoteIdUtility\generate(), OP_CODE_CREATE, eZContentObjectTreeNode\SORT_FIELD_PUBLISHED, eZContentObjectTreeNode\SORT_ORDER_DESC, and eZDebug\writeError().

Referenced by eZContentObject\addLocation(), eZContentObjectVersion\assignToNode(), cloneNodeAssignment(), eZContentFunctions\createAndPublishObject(), eZContentObject\createNodeAssignment(), eZContentObjectPackageHandler\installSuspendedNodeAssignment(), eZTextFileUser\loginUser(), eZObjectRelationListType\onPublish(), eZLDAPUser\publishNewUserGroup(), eZLDAPUser\publishUpdateUser(), eZContentObjectAssignmentHandler\setupAssignments(), and eZContentObjectTreeNode\unserialize().

## ◆ definition()

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 44 of file eznodeassignment.php.

References eZContentObjectTreeNode\SORT_FIELD_PATH, and eZContentObjectTreeNode\SORT_ORDER_ASC.

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

## ◆ fetch()

static eZNodeAssignment::fetch | ( |  | $contentObjectID,
|  |  | $version = `1`,
|  |  | $parentNode = `0`,
|  |  | $asObject = `true`
| ) |  |
| static

Definition at line 409 of file eznodeassignment.php.

References definition(), and eZPersistentObject\fetchObject().

Referenced by eZContentObjectTreeNodeOperations\move(), and eZObjectRelationListType\onPublish().

## ◆ fetchByID()

static eZNodeAssignment::fetchByID | ( |  | $id,
|  |  | $asObject = `true`
| ) |  |
| static

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

See also
  fetchListByID

Definition at line 434 of file eznodeassignment.php.

References definition(), and eZPersistentObject\fetchObject().

## ◆ fetchChildCountByVersionStatus()

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 461 of file eznodeassignment.php.

References eZDB\instance().

Referenced by eZContentObjectTreeNode\removeSubtrees().

## ◆ fetchChildListByVersionStatus()

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 | $idList | node id array
  int | $status | status of the object version
  boolean | $count |
  boolean | $asObject | valid only when $count is false

Returns
  array|int

Definition at line 484 of file eznodeassignment.php.

References eZDB\instance().

## ◆ fetchForObject()

static eZNodeAssignment::fetchForObject | ( |  | $contentObjectID,
|  |  | $version = `1`,
|  |  | $main = `0`,
|  |  | $asObject = `true`
| ) |  |
| static

Definition at line 392 of file eznodeassignment.php.

References definition(), and eZPersistentObject\fetchObjectList().

Referenced by eZContentObject\checkAccess(), eZContentObjectTreeNode\checkAccess(), eZContentObjectVersion\checkAccess(), eZContentObjectVersion\mainParentNodeID(), eZContentObjectVersion\nodeAssignments(), eZContentObjectVersion\parentNodes(), and setNewMainAssignment().

## ◆ fetchListByID()

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 446 of file eznodeassignment.php.

References definition(), and eZPersistentObject\fetchObjectList().

## ◆ fetchNode()

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

Definition at line 425 of file eznodeassignment.php.

References eZContentObjectTreeNode\fetchNode().

## ◆ getParentNode()

eZNodeAssignment::getParentNode | ( |  | ) |

Definition at line 530 of file eznodeassignment.php.

References eZPersistentObject\attribute(), and eZContentObjectTreeNode\fetch().

## ◆ getParentObject()

eZNodeAssignment::getParentObject | ( |  | ) |

Returns
  The contentobject which the parent node points to.

Definition at line 538 of file eznodeassignment.php.

References eZPersistentObject\attribute(), and eZContentObject\fetchByNodeID().

## ◆ isCreateOperation()

eZNodeAssignment::isCreateOperation | ( |  | ) |

Returns true if the assignment is a create operation.

Returns
  bool

Definition at line 161 of file eznodeassignment.php.

References OP_CODE_CREATE.

## ◆ isMoveOperation()

eZNodeAssignment::isMoveOperation | ( |  | ) |

Returns true if the assignment is a move operation.

Returns
  bool

Definition at line 170 of file eznodeassignment.php.

References OP_CODE_MOVE.

## ◆ isNopOperation()

eZNodeAssignment::isNopOperation | ( |  | ) |

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

Returns
  bool

Definition at line 152 of file eznodeassignment.php.

References OP_CODE_NOP.

## ◆ isRemoveOperation()

eZNodeAssignment::isRemoveOperation | ( |  | ) |

Returns true if the assignment is a remove operation.

Returns
  bool

Definition at line 179 of file eznodeassignment.php.

References OP_CODE_REMOVE.

## ◆ isSetOperation()

eZNodeAssignment::isSetOperation | ( |  | ) |

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

Returns
  bool

Definition at line 188 of file eznodeassignment.php.

References OP_CODE_SET.

## ◆ name()

eZNodeAssignment::name | ( |  | ) |

Definition at line 143 of file eznodeassignment.php.

References eZPersistentObject\$Name.

## ◆ purge()

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

  $parentNodeID | The ID of the parent node
  $contentObjectID | The 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 329 of file eznodeassignment.php.

References eZPersistentObject\attribute(), eZDB\instance(), and purgeByParentAndContentObjectID().

## ◆ purgeByID()

static eZNodeAssignment::purgeByID | ( |  | $assignmentID | ) |
| static

Delelet the node assignment with the ID $assignmentID.

Parameters

  $assignmentID | Either 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 364 of file eznodeassignment.php.

References eZPersistentObject\count(), and eZDB\instance().

Referenced by eZContentObjectTreeNodeOperations\copyPublishContentObject().

## ◆ purgeByParentAndContentObjectID()

static eZNodeAssignment::purgeByParentAndContentObjectID | ( |  | $parentNodeID,
|  |  | $contentObjectID
| ) |  |
| static

Remove assignments based on their $parentNodeID and $contentObjectID

Parameters

  int | $parentNodeID |
  int | $contentObjectID |

Definition at line 347 of file eznodeassignment.php.

References eZDB\instance().

Referenced by purge(), and eZContentObjectTreeNode\removeThis().

## ◆ remove()

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

  $parentNodeID | The ID of the parent node
  $contentObjectID | The 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 260 of file eznodeassignment.php.

References definition(), eZPersistentObject\fetchObject(), eZDB\instance(), and OP_CODE_REMOVE.

## ◆ removeByID()

static eZNodeAssignment::removeByID | ( |  | $assignmentID | ) |
| static

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

Parameters

  $assignmentID | Either 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 292 of file eznodeassignment.php.

References eZPersistentObject\count(), eZDB\instance(), and OP_CODE_REMOVE.

## ◆ setName()

eZNodeAssignment::setName | ( |  | $name | ) |

Definition at line 138 of file eznodeassignment.php.

## ◆ setNewMainAssignment()

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 550 of file eznodeassignment.php.

References eZPersistentObject\count(), fetchForObject(), eZDB\instance(), and OP_CODE_REMOVE.

## ◆ tempNode()

eZNodeAssignment::tempNode | ( |  | ) |

Definition at line 124 of file eznodeassignment.php.

References $TempNode, eZPersistentObject\attribute(), and eZContentObjectTreeNode\create().

## Member Data Documentation

## ◆ $ContentobjectID

eZNodeAssignment::$ContentobjectID

Definition at line 600 of file eznodeassignment.php.

## ◆ $ContentObjectVersion

eZNodeAssignment::$ContentObjectVersion

Definition at line 601 of file eznodeassignment.php.

## ◆ $FromNodeID

eZNodeAssignment::$FromNodeID

Definition at line 606 of file eznodeassignment.php.

## ◆ $Hidden

eZNodeAssignment::$Hidden

Definition at line 607 of file eznodeassignment.php.

## ◆ $ID

eZNodeAssignment::$ID

Definition at line 594 of file eznodeassignment.php.

## ◆ $Main

eZNodeAssignment::$Main

Definition at line 605 of file eznodeassignment.php.

## ◆ $OpCode

eZNodeAssignment::$OpCode

Definition at line 19 of file eznodeassignment.php.

## ◆ $ParentNode

eZNodeAssignment::$ParentNode

Definition at line 602 of file eznodeassignment.php.

## ◆ $ParentRemoteID

eZNodeAssignment::$ParentRemoteID

Definition at line 599 of file eznodeassignment.php.

## ◆ $Priority

eZNodeAssignment::$Priority

Definition at line 608 of file eznodeassignment.php.

## ◆ $RemoteID

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 597 of file eznodeassignment.php.

## ◆ $SortField

eZNodeAssignment::$SortField

Definition at line 603 of file eznodeassignment.php.

## ◆ $SortOrder

eZNodeAssignment::$SortOrder

Definition at line 604 of file eznodeassignment.php.

## ◆ $TempNode

eZNodeAssignment::$TempNode

Definition at line 18 of file eznodeassignment.php.

Referenced by tempNode().

## ◆ OP_CODE_CREATE

const eZNodeAssignment::OP_CODE_CREATE = 3

Definition at line 26 of file eznodeassignment.php.

Referenced by create(), and isCreateOperation().

## ◆ OP_CODE_CREATE_NOP

const eZNodeAssignment::OP_CODE_CREATE_NOP = 2

Definition at line 25 of file eznodeassignment.php.

Referenced by eZContentObject\addLocation().

## ◆ OP_CODE_EXECUTE

const eZNodeAssignment::OP_CODE_EXECUTE = 1

Definition at line 23 of file eznodeassignment.php.

## ◆ OP_CODE_MOVE

const eZNodeAssignment::OP_CODE_MOVE = 5

Definition at line 29 of file eznodeassignment.php.

Referenced by isMoveOperation(), and eZContentObjectTreeNodeOperations\move().

## ◆ OP_CODE_MOVE_NOP

const eZNodeAssignment::OP_CODE_MOVE_NOP = 4

Definition at line 28 of file eznodeassignment.php.

## ◆ OP_CODE_NOP

const eZNodeAssignment::OP_CODE_NOP = 0

Definition at line 22 of file eznodeassignment.php.

Referenced by isNopOperation().

## ◆ OP_CODE_REMOVE

const eZNodeAssignment::OP_CODE_REMOVE = 7

Definition at line 32 of file eznodeassignment.php.

Referenced by isRemoveOperation(), remove(), removeByID(), and setNewMainAssignment().

## ◆ OP_CODE_REMOVE_NOP

const eZNodeAssignment::OP_CODE_REMOVE_NOP = 6

Definition at line 31 of file eznodeassignment.php.

## ◆ OP_CODE_SET

const eZNodeAssignment::OP_CODE_SET = 9

Definition at line 35 of file eznodeassignment.php.

Referenced by eZContentObject\copyVersion(), and isSetOperation().

## ◆ OP_CODE_SET_NOP

const eZNodeAssignment::OP_CODE_SET_NOP = 8

Definition at line 34 of file eznodeassignment.php.

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

- eznodeassignment.php

Copyright © 1998 – 2026 7x. All rights reserved. Licensed under the GNU GPLv2+.