SilverShop\Shipping\Model\RegionRestriction
Synopsis
class RegionRestriction
extends DataObject
{
- // members
- private static array $db = ;
- private static array $defaults = ;
- private static string $default_sort = '"Country" ASC, "State" ASC, "City" ASC, "PostalCode" ASC';
- private static array $summary_fields = ;
- private static array $field_labels = ;
- private static array $table_field_types = ;
- private static string $table_name = 'SilverShop_RegionRestriction';
- // methods
- public static array parse_uk_postcode()
- public static void filteredByAddress()
- public static array getAddressFilters()
- public static void get_table_field_types()
- public static void wildcard_sort()
- public void onBeforeWrite()
Hierarchy
Extends
- SilverStripe\ORM\DataObject
Tasks
Line | Task |
---|---|
164 | prevent non-heirarichal entries, eg country = '*', then state = 'blah' |
Members
private
- $db
- $default_sort
- $defaults
- $field_labels
- $summary_fields
- $table_field_types
- $table_name
Methods
public
- filteredByAddress() — Produce a SQL filter to get matching RegionRestrictions to a given address
- getAddressFilters()
- get_table_field_types()
- onBeforeWrite()
- parse_uk_postcode() — Parses a UK postcode to give you the different sections TODO: Very specific functionality. Consider moving this to a separate module
- wildcard_sort() — Produces a sort check to make wildcards come last.