function fractionslider_page_attachments in Views FractionSlider 8
Implements hook_page_attachments().
File
- ./
fractionslider.module, line 11 - Module file for fractionslider.
Code
function fractionslider_page_attachments(array &$attachments) {
$attachments['#attached']['library'][] = 'fractionslider/global-styles-and-scripts';
$configs = array(
'controls' => Drupal::state()
->get('fractionslider_controls'),
'pager' => Drupal::state()
->get('fractionslider_pager'),
'dimensions' => Drupal::state()
->get('fractionslider_dimensions'),
'fullwidth' => Drupal::state()
->get('fractionslider_fullwidth'),
'responsive' => Drupal::state()
->get('fractionslider_responsive'),
'increase' => Drupal::state()
->get('fractionslider_increase'),
'pausehover' => Drupal::state()
->get('fractionslider_pausehover'),
);
$attachments['#attached']['drupalSettings']['fractionslider'] = $configs;
}