SilverCart\Model\Shipment\Carrier
abstract for a shipping carrier.
- Author: Sebastian Diel <sdiel@pixeltricks.de>
- Copyright: 2017 pixeltricks GmbH
- License: see license file in modules root directory
Synopsis
class Carrier
extends DataObject
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static array $has_many = ;
- private static array $belongs_many_many = ;
- private static array $casting = ;
- private static string $default_sort = "priority DESC";
- private static string $table_name = 'SilvercartCarrier';
- // methods
- public string getTitle()
- public string getFullTitle()
- public array searchableFields()
- public FieldList getCMSFields()
- public array fieldLabels()
- protected void onBeforeWrite()
- public array summaryFields()
- public string singular_name()
- public string plural_name()
- public string AttributedZones()
- public string AttributedShippingMethods()
- public ShippingMethod getAllowedShippingMethods()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Members
private
- $belongs_many_many
—
array
Many to many relations - $casting
—
array
Virtual database fields. - $db
—
array
Attributes. - $default_sort
—
string
Default sort field and direction - $has_many
—
array
Has-many relationship. - $has_one
—
array
Has-one relations. - $table_name
—
string
DB table name
Methods
protected
- onBeforeWrite() — Checks whether the {TrackingCode} string was added to TrackingLinkBase (if set at all)
public
- AttributedShippingMethods() — Returns the attributed shipping methods as string (limited to 150 chars).
- AttributedZones() — Returns the attributed zones as string (limited to 150 chars).
- fieldLabels() — Returns the objects field labels
- getAllowedShippingMethods() — Returns all allowed shipping methods for the this carrier
- getCMSFields() — CMS fields
- getFullTitle() — retirieves title from related language class depending on the set locale
- getTitle() — retirieves title from related language class depending on the set locale
- plural_name() — Returns the translated plural name of the object. If no translation exists the class name will be returned.
- searchableFields() — Defines the form fields for the search in ModelAdmin
- singular_name() — Returns the translated singular name of the object. If no translation exists the class name will be returned.
- summaryFields() — Sets the summary fields.