You are here

function select2boxes_page_attachments_alter in Select2 Boxes 8

Implements hook_page_attachments_alter().

File

./select2boxes.module, line 237
Basic module file.

Code

function select2boxes_page_attachments_alter(array &$attachments) {

  // Set our library to already loaded list if the big_pipe module is enabled
  // in order to prevent library being loaded via BigPipe technology.
  if (\Drupal::moduleHandler()
    ->moduleExists('big_pipe')) {
    $attachments['#attached']['library'][] = 'select2boxes/widget';
  }
}