You are here

class StockLocationEvent in Commerce Stock 8

Defines the stock location event.

Hierarchy

  • class \Drupal\commerce_stock_local\Event\StockLocationEvent extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of StockLocationEvent

See also

\Drupal\commerce_stock_local\Event\LocalStockTransactionEvents

File

modules/local_storage/src/Event/StockLocationEvent.php, line 13

Namespace

Drupal\commerce_stock_local\Event
View source
class StockLocationEvent extends Event {

  /**
   * The stock location.
   *
   * @var \Drupal\commerce_stock_local\Entity\LocalStockLocationInterface
   *   The local stock location.
   */
  protected $stockLocation;

  /**
   * Constructs a new stock location event.
   *
   * @param \Drupal\commerce_stock_local\Entity\LocalStockLocationInterface $stock_location
   *   The local stock location.
   */
  public function __construct(LocalStockLocationInterface $stock_location) {
    $this->stockLocation = $stock_location;
  }

  /**
   * Gets the stock location.
   *
   * @return \Drupal\commerce_stock_local\Entity\LocalStockLocationInterface
   *   The local stock location.
   */
  public function getStockLocation() {
    return $this->stockLocation;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
StockLocationEvent::$stockLocation protected property The stock location.
StockLocationEvent::getStockLocation public function Gets the stock location.
StockLocationEvent::__construct public function Constructs a new stock location event.