SilverCart\Model\Payment\PaymentStatus
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2018 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class PaymentStatus
extends DataObject
{
- // constants
- const STATUS_CODE_CANCELED = 'canceled';
- const STATUS_CODE_OPEN = 'open';
- const STATUS_CODE_PAID = 'paid';
- const STATUS_CODE_PARTLY_PAID = 'partly-paid';
- // members
- private static array $db = ;
- private static array $has_many = ;
- private static array $casting = ;
- private static string $default_sort = "SilvercartPaymentStatusTranslation.Title";
- private static string $table_name = 'SilvercartPaymentStatus';
- private static bool $api_access = true;
- private static array $extensions = ;
- private static array $default_codes = ;
- // methods
- public static PaymentStatus get_default()
- public static PaymentStatus|null get_by_code()
- public string singular_name()
- public string plural_name()
- public array fieldLabels()
- public FieldList getCMSFields()
- protected void onBeforeWrite()
- public void requireDefaultRecords()
- public array summaryFields()
- public string getIsDefaultString()
- public string getTitle()
- // 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 |
---|---|
STATUS_CODE_CANCELED | 'canceled' |
STATUS_CODE_OPEN | 'open' |
STATUS_CODE_PAID | 'paid' |
STATUS_CODE_PARTLY_PAID | 'partly-paid' |
Members
private
- $api_access
—
SilverCart\Model\Payment\bool
Grant API access on this item. - $casting
—
array
Castings - $db
—
array
DB attributes. - $default_codes
—
array
Default status codes - $default_sort
—
string
Default sort - $extensions
—
array
List of extensions to use. - $has_many
—
array
1:n relations - $table_name
—
string
DB table name
protected
- $defaultFieldLabels
—
array
Default field labels.
Methods
protected
- onBeforeWrite() — HAndles a default status change on before write.
public
- fieldLabels() — Returns the field labels.
- getCMSFields() — Returns the CMS fields.
- getIsDefaultString() — Casting to get the IsDefault state as a readable string
- getTitle() — retirieves title from related language class depending on the set locale Title is a very common attribute and is therefore located in the decorator
- get_by_code() — Returns the payment status with the given $code.
- get_default() — Returns the default PaymentStatus.
- plural_name() — Returns the translated plural name of the object. If no translation exists the class name will be returned.
- requireDefaultRecords() — Adds the default payment status.
- singular_name() — Returns the translated singular name of the object. If no translation exists the class name will be returned.
- 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.