You are here

fullcalendar_legend.module in FullCalendar 8

Adds a legend of event types.

File

fullcalendar_legend/fullcalendar_legend.module
View source
<?php

/**
 * @file
 * Adds a legend of event types.
 */

/**
 * Implements hook_theme().
 */
function fullcalendar_legend_theme($existing, $type, $theme, $path) {
  return [
    'fullcalendar_legend' => [
      'variables' => [
        'types' => NULL,
      ],
      'file' => 'fullcalendar_legend.theme.inc',
    ],
  ];
}

/**
 * Implements hook_preprocess_block().
 */
function fullcalendar_legend_preprocess_block(&$variables) {
  if ($variables['configuration']['provider'] == 'fullcalendar_legend') {
    $variables['attributes']['class'][] = 'fullcalendar-legend';
  }
}

Functions

Namesort descending Description
fullcalendar_legend_preprocess_block Implements hook_preprocess_block().
fullcalendar_legend_theme Implements hook_theme().