You are here

function fullcalendar_fullcalendar_classes in FullCalendar 8

Same name and namespace in other branches
  1. 8.5 fullcalendar.module \fullcalendar_fullcalendar_classes()
  2. 8.2 fullcalendar.module \fullcalendar_fullcalendar_classes()
  3. 8.3 fullcalendar.module \fullcalendar_fullcalendar_classes()
  4. 8.4 fullcalendar.module \fullcalendar_fullcalendar_classes()
  5. 6.2 fullcalendar.module \fullcalendar_fullcalendar_classes()
  6. 7.2 fullcalendar.module \fullcalendar_fullcalendar_classes()

Implements hook_fullcalendar_classes().

File

./fullcalendar.module, line 67
Provides a views style plugin for FullCalendar

Code

function fullcalendar_fullcalendar_classes(EntityInterface $entity) {
  $classes = [
    'fc-event-default',
    $entity
      ->bundle(),
  ];

  // @todo: ???
  // Add a class for the date field being used.
  if (isset($entity->fullcalendar_date_field)) {
    $classes[] = "fc-event-field-{$entity->fullcalendar_date_field}";
  }
  return $classes;
}