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
eZOrderStatus Class Reference

Handles statuses which can be used on orders. More...

Inheritance diagram for eZOrderStatus:

## Public Member Functions
| isInternal ()
| removeThis ()
| storeCustom ()
Public Member Functions inherited from eZPersistentObject
| __construct ( $row=null)
| eZPersistentObject ( $row=null)
| fill ( $row)
| remove ( $conditions=null, $extraConditions=null)
| 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 | flush ()
static | fetch ( $id, $asObject=true)
static | fetchByStatus ( $statusID, $asObject=true)
static | fetchMap ( $asObject=true, $showInactive=false)
static | fetchList ( $asObject=true, $showInactive=false)
static | fetchPolicyList ( $showInactive=false)
static | fetchOrderedList ( $asObject=true, $showInactive=false)
static | orderStatusCount ( $showInactive=false)
static | create ()
static | createUndefined ()
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
| $StatusID
const | UNDEFINED = 0
const | PENDING = 1
const | PROCESSING = 2
const | DELIVERED = 3
const | CUSTOM = 1000
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

Handles statuses which can be used on orders.

This encapsulates the information about a status using the database table ezorder_status.

This status can be selected on an order and is also stored in a history per order (eZOrderStatusHistory).

The status consists of a name, a global ID and whether it is considered active or not.

The following attributes are defined:

- id - The auto increment ID for the status, this is only used to fetch a given status element from the database.
- status_id - The global ID of the status, values below 1000 is considerd internal and cannot be removed by the user.
- name - The name of the status.
- is_active - Whether the status can be used by the end-user or not.

Some special attributes:

- is_internal - Returns true if the status is considerd an internal one (ID less than 1000).

If the user creates a new status the function storeCustom() must be used, it will find the next available ID in the database and will use locking to avoid race conditions.

To fetch a given status use fetch() when you have the DB ID or fetchByStatus() if you have a status ID. To fetch lists use fetchList() or fetchOrderedList() for a list sorted by name. If you intend to lookup many statuses using the ID the map from fetchMap() might be useful. To find the number of statuses in the system use orderStatusCount().

Definition at line 46 of file ezorderstatus.php.

## Member Function Documentation

## ◆ create()

static eZOrderStatus::create | ( |  | ) |
| static

Creates a new order status and returns it.

Definition at line 277 of file ezorderstatus.php.

References ezpI18n\tr().

## ◆ createUndefined()

static eZOrderStatus::createUndefined | ( |  | ) |
| static

Creates an order status which contains 'Undefined' as name and 0 as status ID. This can be used whenever code expects a status object to work with.

Returns
  The newly created status object.

Definition at line 292 of file ezorderstatus.php.

References ezpI18n\tr(), and UNDEFINED.

Referenced by fetchByStatus().

## ◆ definition()

static eZOrderStatus::definition | ( |  | ) |
| static

Returns
  the persistent object definition for the eZOrderStatus class.

Reimplemented from eZPersistentObject.

Definition at line 63 of file ezorderstatus.php.

Referenced by fetch(), fetchByStatus(), fetchList(), fetchMap(), fetchOrderedList(), and removeThis().

## ◆ fetch()

static eZOrderStatus::fetch | ( |  | $id,
|  |  | $asObject = `true`
| ) |  |
| static

Returns
  the status object with the given DB ID.

Definition at line 111 of file ezorderstatus.php.

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

Referenced by eZOrder\status().

## ◆ fetchByStatus()

static eZOrderStatus::fetchByStatus | ( |  | $statusID,
|  |  | $asObject = `true`
| ) |  |
| static

Returns
  the status object with the given status ID.

Note
  It is safe to call this with ID 0, instead of fetching the DB data it calls createUndefined() and returns that data.

Definition at line 124 of file ezorderstatus.php.

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

Referenced by eZOrder\statusName(), and eZOrder\statusObject().

## ◆ fetchList()

static eZOrderStatus::fetchList | ( |  | $asObject = `true`,
|  |  | $showInactive = `false`
| ) |  |
| static

Parameters

  $asObject | If `true` return them as objects.
  $showInactive | If `true` it will include status items that are not active, default is `false`.

Returns
  A list of defined orders sorted by status ID.

Definition at line 180 of file ezorderstatus.php.

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

## ◆ fetchMap()

static eZOrderStatus::fetchMap | ( |  | $asObject = `true`,
|  |  | $showInactive = `false`
| ) |  |
| static

Parameters

  $asObject | If `true` return them as objects.
  $showInactive | If `true` it will include status items that are not active, default is `false`.

Returns
  A list of defined orders which maps from the status ID to the object.

Definition at line 140 of file ezorderstatus.php.

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

Referenced by eZOrderStatusHistory\fetchOrderStatus().

## ◆ fetchOrderedList()

static eZOrderStatus::fetchOrderedList | ( |  | $asObject = `true`,
|  |  | $showInactive = `false`
| ) |  |
| static

Parameters

  $asObject | If `true` return them as objects.
  $showInactive | If `true` it will include status items that are not active, default is `false`.

Returns
  A list of defined orders sorted by name.

Definition at line 219 of file ezorderstatus.php.

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

Referenced by eZOrder\statusModificationList().

## ◆ fetchPolicyList()

static eZOrderStatus::fetchPolicyList | ( |  | $showInactive = `false` | ) |
| static

Parameters

  $asObject | If `true` return them as objects.
  $showInactive | If `true` it will include status items that are not active, default is `false`.

Returns
  A list of defined orders sorted by status ID.

Definition at line 202 of file ezorderstatus.php.

References eZDB\instance().

## ◆ flush()

static eZOrderStatus::flush | ( |  | ) |
| static

Flushes all global caches for the statuses.

Definition at line 100 of file ezorderstatus.php.

Referenced by removeThis(), and storeCustom().

## ◆ isInternal()

eZOrderStatus::isInternal | ( |  | ) |

Returns
  `true` if the status is considered an internal status.

Definition at line 91 of file ezorderstatus.php.

References CUSTOM.

## ◆ orderStatusCount()

static eZOrderStatus::orderStatusCount | ( |  | $showInactive = `false` | ) |
| static

Returns
  the number of active order statuses

Definition at line 239 of file ezorderstatus.php.

References eZDB\instance().

## ◆ removeThis()

eZOrderStatus::removeThis | ( |  | ) |

Will remove the current status from the database identifed by its DB ID.

Note
  transaction safe

Definition at line 255 of file ezorderstatus.php.

References eZPersistentObject\$ID, definition(), flush(), eZDB\instance(), and eZPersistentObject\removeObject().

## ◆ storeCustom()

eZOrderStatus::storeCustom | ( |  | ) |

Stores a new custom order status. If there is no status ID yet it will acquire a new unique and store it with that. If it already has an ID it calls store() as normally.

Definition at line 312 of file ezorderstatus.php.

References CUSTOM, flush(), eZDB\instance(), and eZPersistentObject\store().

## Member Data Documentation

## ◆ $StatusID

eZOrderStatus::$StatusID

Definition at line 48 of file ezorderstatus.php.

## ◆ CUSTOM

const eZOrderStatus::CUSTOM = 1000

Definition at line 58 of file ezorderstatus.php.

Referenced by isInternal(), and storeCustom().

## ◆ DELIVERED

const eZOrderStatus::DELIVERED = 3

Definition at line 55 of file ezorderstatus.php.

## ◆ PENDING

const eZOrderStatus::PENDING = 1

Definition at line 53 of file ezorderstatus.php.

Referenced by eZBasket\createOrder().

## ◆ PROCESSING

const eZOrderStatus::PROCESSING = 2

Definition at line 54 of file ezorderstatus.php.

## ◆ UNDEFINED

const eZOrderStatus::UNDEFINED = 0

Definition at line 50 of file ezorderstatus.php.

Referenced by createUndefined().

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

- ezorderstatus.php

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