ShipperRegionFormTrait
Edit/add form of a shipper region: a simple multilingual code list (only `name`), like {@see ProductTypeFormTrait}. A tariff references the region by FK.
Table of Contents
Methods
- createComponentEditForm() : Form
- addShipperRegionCountryField() : void
- Countries the region's tariffs deliver to; checkout rejects a tariff whose region does not cover the delivery country. Empty = no restriction.
- addShipperRegionTranslationFields() : void
- buildShipperRegionEntity() : ShipperRegion
- saveShipperRegionForm() : bool
- setShipperRegionFormDefaults() : void
Methods
createComponentEditForm()
protected
createComponentEditForm() : Form
Return values
FormaddShipperRegionCountryField()
Countries the region's tariffs deliver to; checkout rejects a tariff whose region does not cover the delivery country. Empty = no restriction.
private
addShipperRegionCountryField(Form $form) : void
Parameters
- $form : Form
addShipperRegionTranslationFields()
private
addShipperRegionTranslationFields(Form $form) : void
Parameters
- $form : Form
buildShipperRegionEntity()
private
buildShipperRegionEntity(ArrayHash<string|int, mixed> $values) : ShipperRegion
Parameters
- $values : ArrayHash<string|int, mixed>
Return values
ShipperRegionsaveShipperRegionForm()
private
saveShipperRegionForm(ArrayHash<string|int, mixed> $values) : bool
Parameters
- $values : ArrayHash<string|int, mixed>
Return values
boolsetShipperRegionFormDefaults()
private
setShipperRegionFormDefaults(Form $form) : void
Parameters
- $form : Form