eZPublish  3.8
eZOrderStatusHistory Class Reference

Handles a list of status changes to an order item. More...

+ Inheritance diagram for eZOrderStatusHistory:
+ Collaboration diagram for eZOrderStatusHistory:

Public Member Functions

 definition ()
 
 eZOrderStatusHistory ($row)
 
fetchOrderStatus ()
 
fetchOrderStatusName ()
 
modifier ()
 
- Public Member Functions inherited from eZPersistentObject
attribute ($attr, $noFunction=false)
 
 attributes ()
 
 conditionText (&$conditions)
 
conditionTextByRow (&$conditions, &$row)
 
 definition ()
 
escapeArray (&$array)
 
 eZPersistentObject ($row)
 
 fetchObject (&$def, $field_filters, $conds, $asObject=true, $grouping=null, $custom_fields=null)
 
 fetchObjectList (&$def, $field_filters=null, $conds=null, $sorts=null, $limit=null, $asObject=true, $grouping=false, $custom_fields=null)
 
 fill (&$row)
 
 getShortAttributeName (&$db, &$def, $attrName)
 
 handleRows (&$rows, $class_name, $asObject)
 
 hasAttribute ($attr)
 
 hasDirtyData ()
 
 newObjectOrder (&$def, $orderField, $conditions)
 
 remove ($conditions=null, $extraConditions=null)
 
 removeObject (&$def, $conditions=null, $extraConditions=null)
 
 reorderObject (&$def, $orderField, $conditions, $down=true)
 
 setAttribute ($attr, $val)
 
 setHasDirtyData ($hasDirtyData)
 
 store ($fieldFilters=null)
 
 swapRow ($table, &$keys, &$order_id, &$rows, $id1, $id2)
 
 sync ($fieldFilters=null)
 
 updateObjectList ($parameters)
 

Static Public Member Functions

 create ($orderID, $statusID, $userID=false, $timestamp=false)
 
 fetch ($id, $asObject=true)
 
 fetchCount ($orderID, $asObject=true)
 
 fetchListByOrder ($orderID, $asObject=true)
 

Private Attributes

 $Modifier
 This is used for caching the current modifier, it will either contain null (uncached) or a content object (cached). More...
 

Detailed Description

Handles a list of status changes to an order item.

This uses the database table ezorder_status_history to store changes in status for an order item. Each entry consists of the new status, the time it was done and the person who did the change.

The order_id refers to the external ID of an order (order_nr) and not the internal auto increment value.

To fetch a given history element use fetch() with the history ID. If you intend to display the history elements for an order item use the fetchListByOrder() function which returns the history sorted by date (newest first). If you are interested in the number of history elements for an order use the fetchCount() function.

If you intend to create a new history element use the create() function.

Member Function Documentation

eZOrderStatusHistory::create (   $orderID,
  $statusID,
  $userID = false,
  $timestamp = false 
)
static
Returns
A new eZOrderStatusHistory object initialized with the input parameters.

Referenced by eZOrder\createStatusHistory(), and eZOrder\modifyStatus().

eZOrderStatusHistory::definition ( )
Returns
the persistent object definition for the eZOrderStatusHistory class.

Referenced by fetch().

eZOrderStatusHistory::eZOrderStatusHistory (   $row)

Initialises the persistent object with $row. If status_name is present in $row it will cache it in the $StatusName variable.

Referenced by create().

eZOrderStatusHistory::fetch (   $id,
  $asObject = true 
)
static
Returns
the status history object with the given DB ID.
eZOrderStatusHistory::fetchCount (   $orderID,
  $asObject = true 
)
static
Parameters
$asObjectIf true return them as objects.
Returns
A list of defined orders sorted by status ID.

Referenced by eZShopFunctionCollection\fetchOrderStatusHistoryCount().

eZOrderStatusHistory::fetchListByOrder (   $orderID,
  $asObject = true 
)
static
Parameters
$asObjectIf true return them as objects.
Returns
A list of defined orders sorted by status ID.

Referenced by eZShopFunctionCollection\fetchOrderStatusHistory().

& eZOrderStatusHistory::fetchOrderStatus ( )
Returns
The order status object for this history entry.
See Also
fetchOrderStatusName()

Referenced by fetchOrderStatusName().

& eZOrderStatusHistory::fetchOrderStatusName ( )
Returns
The name of the order status for this history entry.
See Also
fetchOrderStatus()
& eZOrderStatusHistory::modifier ( )
Returns
The user which modified the status, this is returned as a content object.
Note
The field modified_id is used to find the user, this will contain the content object ID of the user.

Member Data Documentation

eZOrderStatusHistory::$Modifier
private

This is used for caching the current modifier, it will either contain null (uncached) or a content object (cached).

Referenced by modifier().


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