You are here

function template_preprocess_fullcalendar in FullCalendar 8

Same name and namespace in other branches
  1. 8.3 fullcalendar.theme.inc \template_preprocess_fullcalendar()
  2. 6.2 theme/theme.inc \template_preprocess_fullcalendar()
  3. 7.2 theme/theme.inc \template_preprocess_fullcalendar()

Builds the FullCalendar structure as a render array.

File

./fullcalendar.theme.inc, line 11
Preprocess functions for FullCalendar.

Code

function template_preprocess_fullcalendar(&$variables) {
  $variables['element'] = [
    '#attached' => $variables['options']['#attached'],
    'status' => [
      '#type' => 'container',
      '#attributes' => [
        'class' => [
          'fullcalendar-status',
        ],
      ],
    ],
    'fullcalendar' => [
      '#type' => 'container',
      '#attributes' => [
        'class' => [
          'fullcalendar',
        ],
      ],
    ],
    'content' => [
      '#type' => 'container',
      '#attributes' => [
        'class' => [
          'fullcalendar-content',
        ],
      ],
      'events' => $variables['rows'],
    ],
  ];
}