You are here

function bat_fullcalendar_modal_style in Booking and Availability Management Tools for Drupal 8

Same name and namespace in other branches
  1. 7 modules/bat_fullcalendar/bat_fullcalendar.module \bat_fullcalendar_modal_style()

Define modal JS style and dependencies.

Parameters

$style:

1 call to bat_fullcalendar_modal_style()
bat_fullcalendar_configure in modules/bat_fullcalendar/bat_fullcalendar.module
Fullcalendar settings.

File

modules/bat_fullcalendar/bat_fullcalendar.module, line 274
Manages the display of FullCalendar and provides ways for other modules to easily modify it.

Code

function bat_fullcalendar_modal_style($style = 'default') {
  global $base_path;

  // Styles to use for the modal.
  $modal_style = [
    'buttons' => FALSE,
    'modal' => TRUE,
    'width' => 520,
    'height' => 520,
    'title' => t('Loading...'),
    'loading' => '<img class="loading" src="' . $base_path . drupal_get_path('module', 'bat_fullcalendar') . '/images/throbber.gif">',
  ];

  // Allow other modules to change the modal style.
  \Drupal::moduleHandler()
    ->alter('bat_fullcalendar_modal_style', $modal_style);
  return $modal_style;
}