AfterCommand
class AfterCommand extends InsertCommand (View source)
An AJAX command for calling the jQuery after() method.
The 'insert/after' command instructs the client to use jQuery's after() method to insert the given HTML content after each element matched by the given selector.
This command is implemented by Drupal.AjaxCommands.prototype.insert() defined in misc/ajax.js.
Traits
Trait for Ajax commands that render content and attach assets.
Properties
| protected AttachedAssets | $attachedAssets | The attached assets for this Ajax command. |
from CommandWithAttachedAssetsTrait |
| protected string | $selector | A CSS selector string. |
from InsertCommand |
| protected string|array | $content | The content for the matched element(s). |
from InsertCommand |
| protected array | $settings | A settings array to be passed to any attached JavaScript behavior. |
from InsertCommand |
Methods
Processes the content for output.
Gets the attached assets.
Constructs an InsertCommand object.
Implements Drupal\Core\Ajax\CommandInterface:render().
Details
protected string|MarkupInterface
getRenderedContent()
Processes the content for output.
If content is a render array, it may contain attached assets to be processed.
AttachedAssets|null
getAttachedAssets()
Gets the attached assets.
__construct(string $selector, string|array $content, array $settings = NULL)
Constructs an InsertCommand object.
render()
Implements Drupal\Core\Ajax\CommandInterface:render().