hook_js_settings_build(array &$settings, \Drupal\Core\Asset\AttachedAssetsInterface $assets)
Modify the JavaScript settings (drupalSettings).
The results of this hook are cached, however modules may use hook_js_settings_alter() to dynamically alter settings.
array &$settings: An array of all JavaScript settings (drupalSettings) being presented on the page.
\Drupal\Core\Asset\AttachedAssetsInterface $assets: The assets attached to the current response.
\Drupal\Core\Asset\AssetResolver
function hook_js_settings_build(array &$settings, \Drupal\Core\Asset\AttachedAssetsInterface $assets) { // Manipulate settings. if (isset($settings['dialog'])) { $settings['dialog']['autoResize'] = FALSE; } }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Render!theme.api.php/function/hook_js_settings_build/8.1.x