SilverCart\Model\Order\OrderLog
Order logs are used to log date and time of changing an order. By SilverCarts default, order logs are created when an order status changes from one to another.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class OrderLog
extends DataObject
implements
ModelAdmin_ReadonlyInterface
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static array $casting = ;
- private static string $default_sort = 'Created DESC';
- private static string $table_name = 'SilvercartOrderLog';
- // methods
- public static OrderLog addChangedLog()
- public static OrderLog addMarkedAsSeenLog()
- public static OrderLog addMarkedAsNotSeenLog()
- public static OrderLog addCreatedLog()
- public OrderLog setChangedAction()
- public OrderLog setCreatedAction()
- public OrderLog setMarkedAsSeenAction()
- public OrderLog setMarkedAsNotSeenAction()
- public string getContextNice()
- public string getContextMessage()
- public string getSourceTitle()
- public string getTargetTitle()
- public bool canView()
- public bool canEdit()
- public bool canDelete()
- public array fieldLabels()
- public array summaryFields()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Implements
Members
private
- $casting
—
array
Casted attributes - $db
—
array
DB attributes - $default_sort
—
string
Default sort field and direction - $has_one
—
array
has one relations - $table_name
—
string
DB table name
Methods
public
- addChangedLog() — Adds an log with the action Changed
- addCreatedLog() — Adds an log with the action Created
- addMarkedAsNotSeenLog() — Adds an log with the action MarkedAsNotSeen
- addMarkedAsSeenLog() — Adds an log with the action MarkedAsSeen
- canDelete() — Indicates wether the current user can delete this object.
- canEdit() — Indicates wether the current user can edit this object.
- canView() — Indicates wether the current user can view this object.
- fieldLabels() — Field labgels
- getContextMessage() — Builds and returns the message in the logs context
- getContextNice() — Returns the Context of the log in a human readable state
- getSourceTitle() — Creates and returns the source title
- getTargetTitle() — Creates and returns the target title
- setChangedAction() — Sets the action to Changed.
- setCreatedAction() — Sets the action to Created.
- setMarkedAsNotSeenAction() — Sets the action to MarkedAsSeen.
- setMarkedAsSeenAction() — Sets the action to MarkedAsSeen.
- summaryFields() — Summary fields