\Distributor
A country can only be sent goods to from 1 distributor + the default distributor which can send anywhere in the world.
The default distributor shows prices of the default currency.
Precondition : There is always a default distributor.
Synopsis
class Distributor
extends DataObject
implements
PermissionProvider
{
- // members
- private static array $db = ;
- private static array $has_one = ;
- private static array $has_many = ;
- private static array $field_labels = ;
- private static array $field_labels_right = ;
- private static array $extensions = ;
- private static array $summary_fields = ;
- private static array $default_sort = ;
- private static string $singular_name = "Distributor";
- private static string $plural_name = "Distributors";
- private static boolean $_ran_after_write = false;
- private static string $distributor_permission_code = "distributors";
- // methods
- public string i18n_singular_name()
- public string i18n_plural_name()
- public static Distributor get_one_for_country()
- public static void get_default_distributor()
- public void getCMSFields()
- public void getCountryList()
- public String CMSEditLink()
- public void onBeforeWrite()
- public void onAfterWrite()
- public Boolean canDelete()
- public void requireDefaultRecords()
- public static DataObject get_distributor_group()
- public void providePermissions()
- public void setupUser()
Hierarchy
Extends
- DataObject
Implements
- PermissionProvider
Members
private
- $_ran_after_write
- $db
- $default_sort
- $distributor_permission_code — string
- $extensions
- $field_labels
- $field_labels_right
- $has_many
- $has_one
- $plural_name
- $singular_name
- $summary_fields
Methods
public
- CMSEditLink() — link to edit the record
- canDelete()
- getCMSFields()
- getCountryList() — returns EcommerceCountries that this Distributor is responsible for.
- get_default_distributor()
- get_distributor_group()
- get_one_for_country() — returns the Distributor for the country OR the default Distributor.
- i18n_plural_name() — Return the translated Singular name.
- i18n_singular_name() — Return the translated Singular name.
- onAfterWrite() — ensure there is one default Distributor.
- onBeforeWrite() — ensure there is one default Distributor.
- providePermissions() — {@inheritdoc}
- requireDefaultRecords()
- setupUser()