class RemoveCommand implements CommandInterface (View source)

AJAX command for calling the jQuery remove() method.

The 'remove' command instructs the client to use jQuery's remove() method to remove each of elements matched by the given selector, and everything within them.

This command is implemented by Drupal.AjaxCommands.prototype.remove() defined in misc/ajax.js.

Properties

protected string $selector

The CSS selector for the element(s) to be removed.

Methods

__construct(string $selector)

Constructs a RemoveCommand object.

render()

Implements Drupal\Core\Ajax\CommandInterface:render().

Details

__construct(string $selector)

Constructs a RemoveCommand object.

Parameters

string $selector

The selector.

render()

Implements Drupal\Core\Ajax\CommandInterface:render().