Sunnysideup\Ecommerce\Model\Config\EcommerceDBConfig
Database Settings for E-commerce Similar to SiteConfig but then for E-commerce To access a singleton here, use: EcommerceConfig::inst().
Synopsis
class EcommerceDBConfig
extends DataObject
implements
EditableEcommerceObject
{
- // members
- private static array $array_of_buyables = ;
- private static string $ecommerce_db_config_class_name = self::class;
- private static string $table_name = 'EcommerceDBConfig';
- private static array $db = ;
- private static array $has_one = ;
- private static array $owns = ;
- private static array $indexes = ;
- private static array $casting = ;
- private static array $searchable_fields = ;
- private static array $field_labels = ;
- private static array $summary_fields = ;
- private static array $default_sort = ;
- private static array $defaults = ;
- private static string $singular_name = 'Main E-commerce Configuration';
- private static string $plural_name = 'Main E-commerce Configurations';
- private static string $description = 'A set of configurations for the shop. Each shop needs to have one or more of these settings.';
- private static $_my_current_one;
- // methods
- public void canCreate()
- public void canView()
- public void canEdit()
- public void canDelete()
- public void populateDefaults()
- public void i18n_singular_name()
- public void i18n_plural_name()
- public static void reset_my_current_one()
- public static EcommerceDBConfig|object current_ecommerce_db_config()
- public array fieldLabels()
- public array customFieldLabels()
- public array customDescriptionsForFields()
- public FieldList getCMSFields()
- public string CMSEditLink()
- public void getOrderStepsField()
- public static bool is_buyable()
- public Member Customer()
- public Member CustomerForOrder()
- public void Currency()
- public void Currencies()
- public string AccountPageLink()
- public string CheckoutLink()
- public string CartPageLink()
- public string OrderConfirmationPageLink()
- public void DefaultImageLink()
- public string DefaultImage()
- public void requireDefaultRecords()
- public SiteConfig SiteConfig()
- public string UseThisOneNice()
- public mixed recursiveValue()
- protected void onAfterWrite()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Implements
Tasks
Line | Task |
---|---|
679+ | : consider using Ecomerce Configuration instead? In EcomConfig we only list base classes. |
Members
private
- $_my_current_one
—
string
static holder for its own (or other EcommerceDBConfig) class. - $array_of_buyables — array
- $casting
—
array
Standard SS Variable. - $db
- $default_sort
—
string
Standard SS variable. - $defaults
—
array
Standard SS variable. - $description
—
string
Standard SS variable. - $ecommerce_db_config_class_name — string
- $field_labels
—
array
Standard SS Variable. - $has_one
—
array
Standard SS Variable. - $indexes
—
array
Standard SS Variable. - $owns
—
array
Standard SS Variable. - $plural_name
—
string
Standard SS variable. - $searchable_fields
—
array
Standard SS Variable. - $singular_name
—
string
Standard SS variable. - $summary_fields
—
array
Standard SS Variable. - $table_name
—
array
Standard SS Variable.
Methods
protected
- onAfterWrite() — standard SS method.
public
- AccountPageLink()
- CMSEditLink() — link to edit the record.
- CartPageLink()
- CheckoutLink()
- Currencies() — return null if there is less than two currencies in use on the site.
- Currency() — Return the currency being used on the site e.g. "NZD" or "USD".
- Customer() — Returns the current member.
- CustomerForOrder() — Returns the member for the current order.
- DefaultImage() — Returns the default image or a dummy one if it does not exists.
- DefaultImageLink() — Returns a link to a default image.
- OrderConfirmationPageLink()
- SiteConfig() — returns site config.
- UseThisOneNice() — Casted Variable.
- canCreate() — Standard SS Method.
- canDelete() — Standard SS Method.
- canEdit() — Standard SS Method.
- canView() — Standard SS Method.
- current_ecommerce_db_config() — implements singleton pattern.
- customDescriptionsForFields() — definition of field lables TODO: is this a common SS method?
- customFieldLabels() — definition of field lables TODO: is this a common SS method?
- fieldLabels() — standard SS method for decorators.
- getCMSFields() — standard SS method.
- getOrderStepsField()
- i18n_plural_name()
- i18n_singular_name()
- is_buyable() — tells us if a Class Name is a buyable.
- populateDefaults() — Standard SS Method.
- recursiveValue() — get final value for recursive lookups.
- requireDefaultRecords() — standard SS Method.
- reset_my_current_one()