You are here

function multiselect_page_build in Multiselect 8

Implements hook_page_build().

File

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

Code

function multiselect_page_build(&$page) {
  $config = \Drupal::config('multiselect.settings');
  $page['#attached']['js'][] = [
    'data' => [
      'multiselect' => [
        'widths' => $config
          ->get('multiselect.widths'),
      ],
    ],
    'type' => 'setting',
  ];
}