You are here

function availability_calendar_styles in Availability Calendars 7.4

Same name and namespace in other branches
  1. 7.5 availability_calendar.styles.inc \availability_calendar_styles()
  2. 7.3 availability_calendar.styles.inc \availability_calendar_styles()

Define form callback for the admin/config/availability-calendar/styles page.

Return value

array The form.

3 string references to 'availability_calendar_styles'
availability_calendar_get_styles in ./availability_calendar.styles.inc
Returns the CSS styles defined for the calendars.
availability_calendar_install in ./availability_calendar.install
Implements hook_install(). @link http://api.drupal.org/api/drupal/modules--system--system.api.php/functio...
availability_calendar_menu in ./availability_calendar.module
Implements hook_menu(). @link http://api.drupal.org/api/drupal/modules--system--system.api.php/functio...

File

./availability_calendar.styles.inc, line 37

Code

function availability_calendar_styles() {
  drupal_add_css(drupal_get_path('module', 'availability_calendar') . '/availability_calendar.admin.css');
  $form_builder = new AvailabilityCalendarStylesFormBuilder(availability_calendar_get_styles());
  $form = $form_builder
    ->exec();
  $form['#validate'][] = 'availability_calendar_styles_validate';
  $form = system_settings_form($form);

  // We want our #submit handler to run after the system submit handler, so the generator can simply use the variable API.
  $form['#submit'][] = 'availability_calendar_styles_generate';
  return $form;
}