class BuildZonesEvent in Commerce Core 8.2
Defines the build zones event.
Hierarchy
- class \Drupal\commerce\EventBase extends \Drupal\Component\EventDispatcher\Event
- class \Drupal\commerce_tax\Event\BuildZonesEvent
Expanded class hierarchy of BuildZonesEvent
See also
\Drupal\commerce_tax\Event\TaxEvents
2 files declare their use of BuildZonesEvent
- BuildZonesEventSubscriber.php in modules/
tax/ tests/ modules/ commerce_tax_test/ src/ EventSubscriber/ BuildZonesEventSubscriber.php - LocalTaxTypeBase.php in modules/
tax/ src/ Plugin/ Commerce/ TaxType/ LocalTaxTypeBase.php
File
- modules/
tax/ src/ Event/ BuildZonesEvent.php, line 13
Namespace
Drupal\commerce_tax\EventView source
class BuildZonesEvent extends EventBase {
/**
* The tax zones.
*
* @var \Drupal\commerce_tax\TaxZone[]
*/
protected $zones;
/**
* The tax type plugin.
*
* @var \Drupal\commerce_tax\Plugin\Commerce\TaxType\LocalTaxTypeInterface
*/
protected $plugin;
/**
* Constructs a new BuildZonesEvent.
*
* @param \Drupal\commerce_tax\TaxZone[] $zones
* The tax zones.
* @param \Drupal\commerce_tax\Plugin\Commerce\TaxType\LocalTaxTypeInterface $plugin
* The local tax type plugin.
*/
public function __construct(array $zones, LocalTaxTypeInterface $plugin) {
$this->zones = $zones;
$this->plugin = $plugin;
}
/**
* Gets the tax zones.
*
* @return \Drupal\commerce_tax\TaxZone[]
* The tax zones.
*/
public function getZones() {
return $this->zones;
}
/**
* Sets the tax zones.
*
* @param \Drupal\commerce_tax\TaxZone[] $zones
* The tax zones.
*
* @return $this
*/
public function setZones(array $zones) {
$this->zones = $zones;
return $this;
}
/**
* Gets the local tax type plugin.
*
* @return \Drupal\commerce_tax\Plugin\Commerce\TaxType\LocalTaxTypeInterface
* The tax type plugin.
*/
public function getPlugin() {
return $this->plugin;
}
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BuildZonesEvent:: |
protected | property | The tax type plugin. | |
BuildZonesEvent:: |
protected | property | The tax zones. | |
BuildZonesEvent:: |
public | function | Gets the local tax type plugin. | |
BuildZonesEvent:: |
public | function | Gets the tax zones. | |
BuildZonesEvent:: |
public | function | Sets the tax zones. | |
BuildZonesEvent:: |
public | function | Constructs a new BuildZonesEvent. |