3 namespace Drupal\Core\Ajax;
6 * AJAX command for calling the jQuery remove() method.
8 * The 'remove' command instructs the client to use jQuery's remove() method
9 * to remove each of elements matched by the given selector, and everything
12 * This command is implemented by Drupal.AjaxCommands.prototype.remove()
13 * defined in misc/ajax.js.
15 * @see http://docs.jquery.com/Manipulation/remove#expr
19 class RemoveCommand implements CommandInterface {
22 * The CSS selector for the element(s) to be removed.
29 * Constructs a RemoveCommand object.
31 * @param string $selector
33 public function __construct($selector) {
34 $this->selector = $selector;
38 * Implements Drupal\Core\Ajax\CommandInterface:render().
40 public function render() {
42 'command' => 'remove',
43 'selector' => $this->selector,