Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/Ajax/AfterCommand.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\Core\Ajax; | |
4 | |
5 /** | |
6 * An AJAX command for calling the jQuery after() method. | |
7 * | |
8 * The 'insert/after' command instructs the client to use jQuery's after() | |
9 * method to insert the given HTML content after each element matched by the | |
10 * given selector. | |
11 * | |
12 * This command is implemented by Drupal.AjaxCommands.prototype.insert() | |
13 * defined in misc/ajax.js. | |
14 * | |
15 * @see http://docs.jquery.com/Manipulation/after#content | |
16 * | |
17 * @ingroup ajax | |
18 */ | |
19 class AfterCommand extends InsertCommand { | |
20 | |
21 /** | |
22 * Implements Drupal\Core\Ajax\CommandInterface:render(). | |
23 */ | |
24 public function render() { | |
25 | |
26 return [ | |
27 'command' => 'insert', | |
28 'method' => 'after', | |
29 'selector' => $this->selector, | |
30 'data' => $this->getRenderedContent(), | |
31 'settings' => $this->settings, | |
32 ]; | |
33 } | |
34 | |
35 } |