Base AJAX command that only exists simplify Edit's actual AJAX commands.
Expanded class hierarchy of BaseCommand
class BaseCommand implements CommandInterface {
/**
* The name of the command.
*
* @var string
*/
protected $command;
/**
* The data to pass on to the client side.
*
* @var string
*/
protected $data;
/**
* Constructs a BaseCommand object.
*
* @param string $data
* The data to pass on to the client side.
*/
public function __construct($command, $data) {
$this->command = $command;
$this->data = $data;
}
/**
* Implements Drupal\Core\Ajax\CommandInterface:render().
*/
public function render() {
return array(
'command' => $this->command,
'data' => $this->data,
);
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BaseCommand:: |
protected | property | The name of the command. | |
BaseCommand:: |
protected | property | The data to pass on to the client side. | |
BaseCommand:: |
public | function |
Implements Drupal\Core\Ajax\CommandInterface:render(). Overrides CommandInterface:: |
|
BaseCommand:: |
public | function | Constructs a BaseCommand object. | 4 |