Drupal 8  8.0.2
InsertCommand Class Reference
Inheritance diagram for InsertCommand:

Public Member Functions

 __construct ($selector, $content, array $settings=NULL)
 render ()
- Public Member Functions inherited from CommandInterface
 render ()
 __construct ($selector)
 render ()
- Public Member Functions inherited from CommandWithAttachedAssetsInterface
 getAttachedAssets ()

Protected Attributes

- Protected Attributes inherited from CommandInterface

Detailed Description

Generic AJAX command for inserting content.

This command instructs the client to insert the given HTML using whichever jQuery DOM manipulation method has been specified in the #ajax['method'] variable of the element that triggered the request.

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

Constructor & Destructor Documentation

__construct (   $selector,
array  $settings = NULL 

Constructs an InsertCommand object.

string$selectorA CSS selector.
string | array$contentThe content that will be inserted in the matched element(s), either a render array or an HTML string.
array$settingsAn array of JavaScript settings to be passed to any attached behaviors.

Member Function Documentation

render ( )

Implements Drupal:render().

The documentation for this class was generated from the following file: