SilverCart\Admin\Controllers\OrderAdmin
ModelAdmin for Orders.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class OrderAdmin
extends ModelAdmin
{
- // constants
- const SESSION_KEY = 'SilverCart.OrderAdmin';
- const SESSION_KEY_TAB = 'SilverCart.OrderAdmin.Tab';
- // members
- private static string $menuCode = 'orders';
- private static integer $menuSortIndex = 10;
- private static string $url_segment = 'silvercart-orders';
- private static array $managed_models = ;
- protected $currentTab = NULL;
- // Inherited members from ModelAdmin
- protected GridField $gridField;
- protected GridFieldConfig $gridFieldConfig;
- protected static bool $search_form_is_collapsed;
- // methods
- protected void init()
- public Form getEditForm()
- public DataList getList()
- protected DataList getStatusList()
- protected ArrayList getManagedModelTabs()
- protected string getCurrentTab()
- // Inherited methods from ModelAdmin
- protected void init()
- protected void beforeUpdateInit()
- protected void beforeUpdateEditForm()
- public string SectionTitle()
- public Form getEditForm()
- public string SearchFormCollapseClass()
- public string handleBatchCallback()
- public GridField getGridFieldFor()
- public GridFieldConfig getGridFieldConfigFor()
- public bool canView()
Hierarchy
Constants
Name | Value |
---|---|
SESSION_KEY | 'SilverCart.OrderAdmin' |
SESSION_KEY_TAB | 'SilverCart.OrderAdmin.Tab' |
Members
private
- $managed_models
—
array
Managed models - $url_segment
—
string
The URL segment
protected
- $currentTab
—
string
Current tab - $gridField
—
\SilverStripe\Forms\GridField\GridField
GridField of the edit form - $gridFieldConfig
—
SilverStripe\Forms\GridField\GridFieldConfig
GridFieldConfig of the edit form - $search_form_is_collapsed
—
SilverCart\Admin\Controllers\bool
If this is set to true the ModelAdmins SearchForm will be collapsed on load.
Methods
protected
- getCurrentTab() — Returns the current (tab stored in session).
- getManagedModelTabs() — Adds some additional order tabs to have a fast way to filter orders by important order or payment status.
- getStatusList() — Adds a filter by order or payment status dependent on the given tab.
- init() — Provides hook for decorators, so that they can overwrite css and other definitions.
public
- getEditForm() — Builds and returns the edit form.
- getList() — Returns the current model context list.
Inherited from SilverCart\Admin\Controllers\ModelAdmin
protected
- beforeUpdateEditForm() — Allows user code to hook into ModelAdmin::getEditForm() prior to updateEditForm being called on extensions.
- beforeUpdateInit() — Allows user code to hook into ModelAdmin::init() prior to updateInit being called on extensions.
- init() — Provides hook for decorators, so that they can overwrite css and other definitions.
public
- SearchFormCollapseClass() — Returns the CSS class to use for the SearchForms collapse state.
- SectionTitle() — title in the top bar of the CMS
- canView() — Workaround to hide this class in CMS menu.
- getEditForm() — Builds and returns the edit form.
- getGridFieldConfigFor() — Returns the GridFieldConfig of the given edit form
- getGridFieldFor() — Returns the GridField of the given edit form
- handleBatchCallback() — Handles a batch action