UpdateOptionsCommand.php in Business Rules 8
File
src/Ajax/UpdateOptionsCommand.php
View source
<?php
namespace Drupal\business_rules\Ajax;
use Drupal\Core\Ajax\CommandInterface;
class UpdateOptionsCommand implements CommandInterface {
protected $elementId;
protected $options;
protected $formatter;
public function __construct($elementId, array $options, $formatter) {
$this->elementId = $elementId;
$this->options = $options;
$this->formatter = $formatter;
}
public function render() {
return [
'command' => 'updateOptionsCommand',
'method' => 'html',
'elementId' => $this->elementId,
'options' => $this->options,
'formatter' => $this->formatter,
];
}
}