class SelectEntitiesCommand in Entity Browser 8
Same name and namespace in other branches
- 8.2 src/Ajax/SelectEntitiesCommand.php \Drupal\entity_browser\Ajax\SelectEntitiesCommand
AJAX command to rerender a formatted text field without any transformation filters.
Hierarchy
- class \Drupal\entity_browser\Ajax\SelectEntitiesCommand implements CommandInterface
Expanded class hierarchy of SelectEntitiesCommand
File
- src/Ajax/ SelectEntitiesCommand.php, line 11 
Namespace
Drupal\entity_browser\AjaxView source
class SelectEntitiesCommand implements CommandInterface {
  /**
   * A unique identifier.
   *
   * @var string
   */
  protected $uuid;
  /**
   * A CSS selector string.
   *
   * @var array
   */
  protected $entities;
  /**
   * Constructs a \Drupal\entity_browser\Ajax\SelectEntities object.
   *
   * @param string $uuid
   *   Entity browser instance UUID.
   * @param array $entities
   *   Entities that were selected. Each entity is represented with an array
   *   consisting of three values (entity ID, entity UUID and entity type).
   */
  public function __construct($uuid, $entities) {
    $this->uuid = $uuid;
    $this->entities = $entities;
  }
  /**
   * Implements \Drupal\Core\Ajax\CommandInterface::render().
   */
  public function render() {
    return [
      'command' => 'select_entities',
      'uuid' => $this->uuid,
      'entities' => $this->entities,
    ];
  }
}Members
| Name   | Modifiers | Type | Description | Overrides | 
|---|---|---|---|---|
| SelectEntitiesCommand:: | protected | property | A CSS selector string. | |
| SelectEntitiesCommand:: | protected | property | A unique identifier. | |
| SelectEntitiesCommand:: | public | function | Implements \Drupal\Core\Ajax\CommandInterface::render(). Overrides CommandInterface:: | |
| SelectEntitiesCommand:: | public | function | Constructs a \Drupal\entity_browser\Ajax\SelectEntities object. | 
