ckeditor_accordion.module in CKEditor Accordion 8
Same filename and directory in other branches
Functions to support creating CKEditor Accordion.
File
ckeditor_accordion.moduleView source
<?php
/**
* @file
* Functions to support creating CKEditor Accordion.
*/
/**
* Implements hook_page_attachments_alter().
*/
function ckeditor_accordion_page_attachments_alter(array &$page) {
$config = \Drupal::config('ckeditor_accordion.settings');
// Attaches css assets globally.
$page['#attached']['library'][] = 'ckeditor_accordion/accordion_style';
// Pass settings to JavaScript.
$page['#attached']['drupalSettings']['ckeditorAccordion']['accordionStyle']['collapseAll'] = $config
->get('collapse_all');
$page['#attached']['drupalSettings']['ckeditorAccordion']['accordionStyle']['keepRowsOpen'] = $config
->get('keep_rows_open');
}
Functions
Name | Description |
---|---|
ckeditor_accordion_page_attachments_alter | Implements hook_page_attachments_alter(). |