3 namespace Drupal\Core\Ajax;
6 * AJAX command for calling the jQuery insert() method.
8 * The 'insert/prepend' command instructs the client to use jQuery's prepend()
9 * method to prepend the given HTML content to the inside each element matched
10 * by the given selector.
12 * This command is implemented by Drupal.AjaxCommands.prototype.insert()
13 * defined in misc/ajax.js.
15 * @see http://docs.jquery.com/Manipulation/prepend#content
19 class PrependCommand extends InsertCommand {
22 * Implements Drupal\Core\Ajax\CommandInterface:render().
24 public function render() {
27 'command' => 'insert',
28 'method' => 'prepend',
29 'selector' => $this->selector,
30 'data' => $this->getRenderedContent(),
31 'settings' => $this->settings,