You are here

public function SettingsCommand::__construct in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Ajax/SettingsCommand.php \Drupal\Core\Ajax\SettingsCommand::__construct()

Constructs a SettingsCommand object.

Parameters

array $settings: An array of key/value pairs of JavaScript settings.

bool $merge: Whether the settings should be merged into the global drupalSettings.

File

core/lib/Drupal/Core/Ajax/SettingsCommand.php, line 47

Class

SettingsCommand
AJAX command for adjusting Drupal's JavaScript settings.

Namespace

Drupal\Core\Ajax

Code

public function __construct(array $settings, $merge = FALSE) {
  $this->settings = $settings;
  $this->merge = $merge;
}