You are here

function extlink_library_info_alter in External Links 8

Implements hook_library_info_alter().

File

./extlink.module, line 132
This is the External Links module.

Code

function extlink_library_info_alter(&$libraries, $extension) {
  if ($extension === 'extlink' && isset($libraries['drupal.extlink']) && \Drupal::config('extlink.settings')
    ->get('extlink_use_external_js_file')) {

    // Add the external settings JS file as a dependency to the drupal.extlink
    // library so that it will be loaded when configuration is set to use the
    // external file.
    $libraries['drupal.extlink']['dependencies'][] = 'extlink/extlink.settings';
  }
}