You are here

class EntitySelectionEvent in Entity Browser 8.2

Same name and namespace in other branches
  1. 8 src/Events/EntitySelectionEvent.php \Drupal\entity_browser\Events\EntitySelectionEvent

Represents entity selection as event.

Hierarchy

  • class \Drupal\entity_browser\Events\EventBase extends \Symfony\Component\EventDispatcher\Event

Expanded class hierarchy of EntitySelectionEvent

1 file declares its use of EntitySelectionEvent
WidgetBase.php in src/WidgetBase.php

File

src/Events/EntitySelectionEvent.php, line 8

Namespace

Drupal\entity_browser\Events
View source
class EntitySelectionEvent extends EventBase {

  /**
   * Entities being selected.
   *
   * @var \Drupal\Core\Entity\EntityInterface[]
   */
  protected $entities;

  /**
   * Constructs a EntitySelectionEvent object.
   *
   * @param string $entity_browser_id
   *   Entity browser ID.
   * @param string $instance_uuid
   *   Entity browser instance UUID.
   * @param \Drupal\Core\Entity\EntityInterface[] $entities
   *   Array of selected entities.
   */
  public function __construct($entity_browser_id, $instance_uuid, array $entities) {
    parent::__construct($entity_browser_id, $instance_uuid);
    $this->entities = $entities;
  }

  /**
   * Gets selected entities.
   *
   * @return \Drupal\Core\Entity\EntityInterface[]
   */
  public function getEntities() {
    return $this->entities;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntitySelectionEvent::$entities protected property Entities being selected.
EntitySelectionEvent::getEntities public function Gets selected entities.
EntitySelectionEvent::__construct public function Constructs a EntitySelectionEvent object. Overrides EventBase::__construct
EventBase::$entityBrowserID protected property Entity browser id.
EventBase::$instanceUUID protected property Entity browser instance UUID.
EventBase::getBrowserID public function Gets the entity browser ID:.
EventBase::getBrowserInstanceUUID public function Gets the entity browser instance UUID:.