You are here

abstract class AbstractEntityEvent in Hook Event Dispatcher 8.2

Same name and namespace in other branches
  1. 3.x modules/core_event_dispatcher/src/Event/Entity/AbstractEntityEvent.php \Drupal\core_event_dispatcher\Event\Entity\AbstractEntityEvent

Class AbstractEntityEvent.

Hierarchy

Expanded class hierarchy of AbstractEntityEvent

File

modules/core_event_dispatcher/src/Event/Entity/AbstractEntityEvent.php, line 12

Namespace

Drupal\core_event_dispatcher\Event\Entity
View source
abstract class AbstractEntityEvent extends Event implements EventInterface {

  /**
   * The Entity.
   *
   * @var \Drupal\Core\Entity\EntityInterface
   */
  protected $entity;

  /**
   * AbstractEntityEvent constructor.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   The Entity.
   */
  public function __construct(EntityInterface $entity) {
    $this->entity = $entity;
  }

  /**
   * Get the Entity.
   *
   * @return \Drupal\Core\Entity\EntityInterface
   *   The Entity.
   */
  public function getEntity() : EntityInterface {
    return $this->entity;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
AbstractEntityEvent::$entity protected property The Entity.
AbstractEntityEvent::getEntity public function Get the Entity.
AbstractEntityEvent::__construct public function AbstractEntityEvent constructor. 4
EventInterface::getDispatcherType public function Get the dispatcher type. 75