Interim commit.
[yaffs-website] / web / modules / contrib / entity_browser / src / Ajax / ValueUpdatedCommand.php
1 <?php
2
3 namespace Drupal\entity_browser\Ajax;
4
5 use Drupal\Core\Ajax\CommandInterface;
6
7 /**
8  * AJAX command to refresh an entity_browser_entity_reference field widget.
9  */
10 class ValueUpdatedCommand implements CommandInterface {
11
12   /**
13    * The ID for the details element.
14    *
15    * @var string
16    */
17   protected $details_id;
18
19   /**
20    * Constructor.
21    *
22    * @param string $details_id
23    *   The ID for the details element.
24    */
25   public function __construct($details_id) {
26     $this->details_id = $details_id;
27   }
28
29   /**
30    * {@inheritdoc}
31    */
32   public function render() {
33     return [
34       'command' => 'entity_browser_value_updated',
35       'details_id' => $this->details_id,
36     ];
37   }
38
39 }