You are here

class StoreEvent in Commerce Core 8.2

Defines the store event.

Hierarchy

  • class \Drupal\commerce\EventBase extends \Drupal\Component\EventDispatcher\Event

Expanded class hierarchy of StoreEvent

See also

\Drupal\commerce_store\Event\StoreEvents

File

modules/store/src/Event/StoreEvent.php, line 13

Namespace

Drupal\commerce_store\Event
View source
class StoreEvent extends EventBase {

  /**
   * The store.
   *
   * @var \Drupal\commerce_store\Entity\StoreInterface
   */
  protected $store;

  /**
   * Constructs a new StoreEvent.
   *
   * @param \Drupal\commerce_store\Entity\StoreInterface $store
   *   The store.
   */
  public function __construct(StoreInterface $store) {
    $this->store = $store;
  }

  /**
   * Gets the store.
   *
   * @return \Drupal\commerce_store\Entity\StoreInterface
   *   The store.
   */
  public function getStore() {
    return $this->store;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
StoreEvent::$store protected property The store.
StoreEvent::getStore public function Gets the store.
StoreEvent::__construct public function Constructs a new StoreEvent.