function template_preprocess_fullcalendar_event in FullCalendar 7.2
Same name and namespace in other branches
- 8 fullcalendar.theme.inc \template_preprocess_fullcalendar_event()
- 8.3 fullcalendar.theme.inc \template_preprocess_fullcalendar_event()
Build the render array for an individual event.
File
- theme/
theme.inc, line 83 - Preprocess functions for FullCalendar.
Code
function template_preprocess_fullcalendar_event(&$variables) {
$variables['element'] = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fullcalendar-event',
),
),
'title' => array(
'#prefix' => '<h3 class="title">',
'#suffix' => '</h3>',
'#markup' => $variables['entity']->title,
),
);
foreach ($variables['event'] as $instance) {
$variables['element'][] = array(
'#type' => 'container',
'#attributes' => array(
'class' => array(
'fullcalendar-instance',
),
),
array(
$instance,
),
);
}
}