You are here

function multiselect_page_attachments in Multiselect 2.x

Implements hook_page_attachments().

File

./multiselect.module, line 35
Select multiple items in an easier way than the normal node-reference widget.

Code

function multiselect_page_attachments(&$attachments) {
  $config = \Drupal::config('multiselect.settings');
  $attachments['#attached']['drupalSettings']['multiselect'] = [
    'widths' => $config
      ->get('multiselect.widths'),
  ];
}