SilverCart\Model\Product\AvailabilityStatus
Abstract for an availibility status.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class AvailabilityStatus
extends DataObject
{
- // members
- private static array $db = ;
- private static array $casting = ;
- private static array $has_many = ;
- private static string $table_name = 'SilvercartAvailabilityStatus';
- private static array $extensions = ;
- private static string $badge_color_preorder = 'primary';
- public static array $default_microdata_codes = ;
- // methods
- public string singular_name()
- public string plural_name()
- public array fieldLabels()
- public FieldList getCMSFields()
- public array summaryFields()
- public array searchableFields()
- public string getTitle()
- public string getMicrodataCode()
- public string getAdditionalText()
- public string getSetForPositiveStockNice()
- public string getSetForNegativeStockNice()
- public string getIsDefaultString()
- public static AvailabilityStatus get_negative_status()
- public static AvailabilityStatus get_positive_status()
- protected void onBeforeWrite()
- public static Tax getDefault()
- // 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
Members
private
- $badge_color_preorder
—
string
DB table name - $casting
—
array
field casting - $db
—
array
attributes - $extensions
—
array
List of extensions to use. - $has_many
—
array
1:n relationships. - $table_name
—
string
DB table name
protected
- $defaultFieldLabels
—
array
Default field labels.
public
- $default_microdata_codes
—
array
List of default microdata codes.
Methods
protected
- onBeforeWrite() — Sets for other status SetForNegativeStock and SetForPositiveStock to false when set to $this.
public
- fieldLabels() — Field labels for display in tables.
- getAdditionalText() — getter for the pseudo attribute AdditionalText
- getCMSFields() — customizes the backends fields, mainly for ModelAdmin
- getDefault() — Returns the default tax rate
- getIsDefaultString() — Casting to get the IsDefault state as a readable string
- getMicrodataCode() — Returns the title for SEO microdata
- getSetForNegativeStockNice() — Returns "Yes" (i18n) or an empty string.
- getSetForPositiveStockNice() — Returns "Yes" (i18n) or an empty string.
- getTitle() — Getter for the pseudo attribute title.
- get_negative_status() — Returns the availability status to use when a product gets a negative stock.
- get_positive_status() — Returns the availability status to use when a product gets a positive stock.
- plural_name() — Returns the translated plural name of the object.
- searchableFields() — Defines the form fields for the search in ModelAdmin
- singular_name() — Returns the translated singular name of the object.
- summaryFields() — Summaryfields for display in tables.
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.