Add an AJAX command to the response.
object $command: An AJAX command object implementing CommandInterface.
boolean $prepend: A boolean which determines whether the new command should be executed before previously added commands. Defaults to FALSE.
AjaxResponse The current AjaxResponse.
public function addCommand($command, $prepend = FALSE) {
if ($prepend) {
array_unshift($this->commands, $command
->render());
}
else {
$this->commands[] = $command
->render();
}
return $this;
}