function fullcalendar_page_attachments in FullCalendar 8.2
Same name and namespace in other branches
- 8.5 fullcalendar.module \fullcalendar_page_attachments()
- 8.4 fullcalendar.module \fullcalendar_page_attachments()
Implements hook_preprocess_fullcalendar().
Process FullCalendar Colors after the structure is built.
File
- ./
fullcalendar.module, line 196 - Provides a views style plugin for FullCalendar
Code
function fullcalendar_page_attachments(array &$attachments) {
// TODO D8: Remove weight once http://drupal.org/node/1388546 is fixed.
// TODO: This doesn't work because the style tag is positioned too high in
// the head to have any effect.
if (\Drupal::moduleHandler()
->moduleExists('colors')) {
$css = colors_create_css('fullcalendar');
$attachments['#attached']['html_head'][] = [
[
'#type' => 'html_tag',
'#tag' => 'style',
'#value' => $css,
'#weight' => 1000,
],
'fullcalendar-inline-css',
];
}
}