You are here

function autologout_attach_js in Automated Logout 8

Adds the necessary js and libraries.

Parameters

array $element: The renderable array element to #attach the js to.

array $settings: The JS Settings.

1 call to autologout_attach_js()
autologout_page_attachments in ./autologout.module
Implements hook_page_attachments().

File

./autologout.module, line 276
Automated Logout - Module.

Code

function autologout_attach_js(array &$element, array $settings) {
  $element['#attached']['drupalSettings']['autologout'] = $settings;
  $element['#attached']['library'][] = 'autologout/drupal.autologout';
  $element['#cache']['tags'][] = 'config:autologout.settings';
}