3 namespace Drupal\Core\Ajax;
6 * Base command that only exists to simplify AJAX commands.
8 class BaseCommand implements CommandInterface {
11 * The name of the command.
18 * The data to pass on to the client side.
25 * Constructs a BaseCommand object.
27 * @param string $command
28 * The name of the command.
30 * The data to pass on to the client side.
32 public function __construct($command, $data) {
33 $this->command = $command;
40 public function render() {
42 'command' => $this->command,
43 'data' => $this->data,