eZ Publish  [trunk]
eZOrderStatusHistory Class Reference

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

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

List of all members.

Public Member Functions

 eZOrderStatusHistory ($row)
 fetchOrderStatus ()
 fetchOrderStatusName ()
 modifier ()

Static Public Member Functions

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

Public Attributes

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

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.

Definition at line 34 of file ezorderstatushistory.php.


Member Function Documentation

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

Definition at line 183 of file ezorderstatushistory.php.

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

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

Reimplemented from eZPersistentObject.

Definition at line 52 of file ezorderstatushistory.php.

Referenced by fetch().

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

Definition at line 40 of file ezorderstatushistory.php.

Referenced by create().

eZOrderStatusHistory::fetch ( id,
asObject = true 
) [static]
Returns:
the status history object with the given DB ID.

Definition at line 138 of file ezorderstatushistory.php.

Referenced by modifier().

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

Definition at line 170 of file ezorderstatushistory.php.

Referenced by eZShopFunctionCollection\fetchOrderStatusHistoryCount().

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

Definition at line 151 of file ezorderstatushistory.php.

Referenced by eZShopFunctionCollection\fetchOrderStatusHistory().

Returns:
The order status object for this history entry.
See also:
fetchOrderStatusName()

Definition at line 110 of file ezorderstatushistory.php.

Referenced by fetchOrderStatusName().

Returns:
The name of the order status for this history entry.
See also:
fetchOrderStatus()

Definition at line 124 of file ezorderstatushistory.php.

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.

Definition at line 97 of file ezorderstatushistory.php.


Member Data Documentation

eZOrderStatusHistory::$Modifier

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

Definition at line 205 of file ezorderstatushistory.php.


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