3 namespace Drupal\entity_browser\Ajax;
5 use Drupal\Core\Ajax\CommandInterface;
8 * AJAX command to rerender a formatted text field without any transformation
11 class SelectEntitiesCommand implements CommandInterface {
14 * A unique identifier.
21 * A CSS selector string.
28 * Constructs a \Drupal\entity_browser\Ajax\SelectEntities object.
31 * Entity browser instance UUID.
32 * @param array $entities
33 * Entities that were selected. Each entity is represented with an array
34 * consisting of three values (entity ID, entity UUID and entity type).
36 public function __construct($uuid, $entities) {
38 $this->entities = $entities;
42 * Implements \Drupal\Core\Ajax\CommandInterface::render().
44 public function render() {
46 'command' => 'select_entities',
47 'uuid' => $this->uuid,
48 'entities' => $this->entities,