You are here

public function FilterLocationsEvent::__construct in Commerce Stock 8

Constructs a new FilterLocationsEvent object.

Parameters

\Drupal\commerce\PurchasableEntityInterface $entity: The purchasable entity.

\Drupal\commerce_stock_local\Entity\LocalStockLocationInterface[] $locations: The local stock locations.

File

modules/local_storage/src/Event/FilterLocationsEvent.php, line 38

Class

FilterLocationsEvent
Defines the filter locations event.

Namespace

Drupal\commerce_stock_local\Event

Code

public function __construct(PurchasableEntityInterface $entity, array $locations) {
  $this->purchasableEntity = $entity;
  $this->locations = $locations;
}