CoolCMS API

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

addShipperRegionCountryField()

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

saveShipperRegionForm()

private saveShipperRegionForm(ArrayHash<string|int, mixed> $values) : bool
Parameters
$values : ArrayHash<string|int, mixed>
Return values
bool
On this page

Search results