Same filename and directory in other branches
- 8.9.x core/lib/Drupal/Core/Ajax/BaseCommand.php
- 9 core/lib/Drupal/Core/Ajax/BaseCommand.php
Namespace
Drupal\Core\Ajax
File
core/lib/Drupal/Core/Ajax/BaseCommand.php
View source
<?php
namespace Drupal\Core\Ajax;
class BaseCommand implements CommandInterface {
protected $command;
protected $data;
public function __construct($command, $data) {
$this->command = $command;
$this->data = $data;
}
public function render() {
return [
'command' => $this->command,
'data' => $this->data,
];
}
}
Classes
Name |
Description |
BaseCommand |
Base command that only exists to simplify AJAX commands. |