class EntitySelectionEvent in Entity Browser 8
Same name and namespace in other branches
- 8.2 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
- class \Drupal\entity_browser\Events\EntitySelectionEvent
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\EventsView 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
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntitySelectionEvent:: |
protected | property | Entities being selected. | |
EntitySelectionEvent:: |
public | function | Gets selected entities. | |
EntitySelectionEvent:: |
public | function |
Constructs a EntitySelectionEvent object. Overrides EventBase:: |
|
EventBase:: |
protected | property | Entity browser id. | |
EventBase:: |
protected | property | Entity browser instance UUID. | |
EventBase:: |
public | function | Gets the entity browser ID:. | |
EventBase:: |
public | function | Gets the entity browser instance UUID:. |