Drupal 8  8.0.2
SettingsCommand Class Reference
Inheritance diagram for SettingsCommand:

Public Member Functions

 __construct (array $settings, $merge=FALSE)
 render ()
- Public Member Functions inherited from CommandInterface
 render ()
 __construct ($selector)
 render ()

Protected Attributes

- Protected Attributes inherited from CommandInterface

Detailed Description

AJAX command for adjusting Drupal's JavaScript settings.

The 'settings' command instructs the client either to use the given array as the settings for ajax-loaded content or to extend drupalSettings with the given array, depending on the value of the $merge parameter.

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

Constructor & Destructor Documentation

__construct ( array  $settings,
  $merge = FALSE 

Constructs a SettingsCommand object.

array$settingsAn array of key/value pairs of JavaScript settings.
bool$mergeWhether the settings should be merged into the global drupalSettings.

Member Function Documentation

render ( )

Implements Drupal:render().

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