You are here

class EntityLoadEvent in Hook Event Dispatcher 8

Class EntityLoadEvent.

Hierarchy

Expanded class hierarchy of EntityLoadEvent

1 file declares its use of EntityLoadEvent
hook_event_dispatcher.module in ./hook_event_dispatcher.module
Hook event dispatcher module.

File

src/Event/Entity/EntityLoadEvent.php, line 12

Namespace

Drupal\hook_event_dispatcher\Event\Entity
View source
class EntityLoadEvent extends Event implements EventInterface {

  /**
   * The entities.
   *
   * @var array
   */
  protected $entities;

  /**
   * The entity type id.
   *
   * @var string
   */
  protected $entityTypeId;

  /**
   * EntityLoadEvent constructor.
   *
   * @param array $entities
   *   The entities.
   * @param string $entityTypeId
   *   The entity type id.
   */
  public function __construct(array $entities, $entityTypeId) {
    $this->entities = $entities;
    $this->entityTypeId = $entityTypeId;
  }

  /**
   * Get the entities.
   *
   * @return array
   *   The entities.
   */
  public function getEntities() {
    return $this->entities;
  }

  /**
   * Get the entity type id.
   *
   * @return string
   *   The entity type id.
   */
  public function getEntityTypeId() {
    return $this->entityTypeId;
  }

  /**
   * {@inheritdoc}
   */
  public function getDispatcherType() {
    return HookEventDispatcherInterface::ENTITY_LOAD;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityLoadEvent::$entities protected property The entities.
EntityLoadEvent::$entityTypeId protected property The entity type id.
EntityLoadEvent::getDispatcherType public function Get the dispatcher type. Overrides EventInterface::getDispatcherType
EntityLoadEvent::getEntities public function Get the entities.
EntityLoadEvent::getEntityTypeId public function Get the entity type id.
EntityLoadEvent::__construct public function EntityLoadEvent constructor.