SilverCart\Model\Pages\AddressHolder
Child of customer area; overview of all addresses;
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class AddressHolder
extends MyAccountHolder
{
- // Inherited constants from MyAccountHolder
- const SESSION_KEY = 'SilverCart.MyAccountHolder';
- const INFO_MESSAGE_SESSION_KEY = 'SilverCart.MyAccountHolder.InfoMessages';
- const INFO_MESSAGE_TYPE_INFO = 'info';
- const INFO_MESSAGE_TYPE_SUCCESS = 'success';
- const INFO_MESSAGE_TYPE_WARNING = 'warning';
- const INFO_MESSAGE_TYPE_DANGER = 'danger';
- // members
- private static string $table_name = 'SilvercartAddressHolder';
- private static bool $can_be_root = false;
- private static string $icon = "silvercart/silvercart:client/img/page_icons/my_account_holder-file.gif";
- // methods
- public string singular_name()
- public string plural_name()
- public array fieldLabels()
- public boolean hasSummary()
- public string getSummary()
- public string getSummaryTitle()
- public string getSection()
- public ArrayList getBreadcrumbItems()
- // Inherited methods from MyAccountHolder
- public string singular_name()
- public string plural_name()
- public static void add_info_message()
- public static array get_info_messages()
- public static void set_info_messages()
- public static void save_info_messages()
- public static void reset_info_messages()
- public ArrayList InfoMessages()
- // Inherited methods from ExtensibleDataObject
- protected void beforeRequireDefaultRecords()
- protected void beforeUpdateCMSActions()
- protected void beforeUpdateFieldLabels()
- protected void beforeUpdateProvidePermissions()
- public array defaultFieldLabels()
- public static void reset_field_labels()
- protected array scaffoldFieldLabels()
Hierarchy
Constants
Name | Value |
---|---|
SESSION_KEY | 'SilverCart.MyAccountHolder' |
INFO_MESSAGE_SESSION_KEY | 'SilverCart.MyAccountHolder.InfoMessages' |
INFO_MESSAGE_TYPE_INFO | 'info' |
INFO_MESSAGE_TYPE_SUCCESS | 'success' |
INFO_MESSAGE_TYPE_WARNING | 'warning' |
INFO_MESSAGE_TYPE_DANGER | 'danger' |
Members
private
- $can_be_root
—
SilverCart\Model\Pages\bool
Indicates whether this page type can be root - $icon
—
string
The icon to use for this page in the storeadmin sitetree. - $table_name
—
string
DB table name
protected
- $defaultFieldLabels
—
array
Default field labels.
Methods
public
- fieldLabels() — Returns the field labels.
- getBreadcrumbItems() — Adds the add/edit address title to the bradcrumbs by context.
- getSection() — configure the class name of the DataObjects to be shown on this page this is needed to show correct breadcrumbs
- getSummary() — Returns the summary of this page.
- getSummaryTitle() — Returns the summary of this page.
- hasSummary() — Returns whether this page has a summary.
- plural_name() — Returns the translated plural name of the object. If no translation exists the class name will be returned.
- singular_name() — Returns the translated singular name of the object. If no translation exists the class name will be returned.
Inherited from SilverCart\Model\Pages\MyAccountHolder
public
- InfoMessages() — Returns the info messages to render in template.
- add_info_message() — Adds the given message to the info messages.
- get_info_messages() — Returns the info messages.
- plural_name() — Returns the translated plural name of the object. If no translation exists the class name will be returned.
- reset_info_messages() — Clears the info message data out of session.
- save_info_messages() — Saves the info messages in session.
- set_info_messages() — Sets the info messages.
- singular_name() — Returns the translated singular name of the object. If no translation exists the class name will be returned.
Inherited from SilverCart\ORM\ExtensibleDataObject
protected
- beforeRequireDefaultRecords() — Allows user code to hook into DataObject::requireDefaultRecords() prior to requireDefaultRecords being called on extensions.
- beforeUpdateCMSActions() — Allows user code to hook into DataObject::getCMSActions prior to updateCMSActions being called on extensions.
- beforeUpdateFieldLabels() — Allows user code to hook into DataObject::fieldLabels() prior to updateFieldLabels being called on extensions.
- beforeUpdateProvidePermissions() — Allows user code to hook into DataObject::updateProvidePermissions() prior to providePermissions being called on extensions.
- scaffoldFieldLabels() — Returns the default field labels for this DataObject.
public
- defaultFieldLabels() — Returns the default field labels.
- reset_field_labels() — Resets the field label cache.