function availability_calendar_styles_generate in Availability Calendars 7.3
Same name and namespace in other branches
- 7.5 availability_calendar.styles.inc \availability_calendar_styles_generate()
- 7.4 availability_calendar.styles.inc \availability_calendar_styles_generate()
Callback to process form submission for the styles form.
2 calls to availability_calendar_styles_generate()
- 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_update_7301 in ./
availability_calendar.install - Regenerate custom styles file.
3 string references to 'availability_calendar_styles_generate'
- 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_styles in ./
availability_calendar.styles.inc - Callback to retrieve a form for the admin/config/availability-calendar/styles page.
File
- ./
availability_calendar.styles.inc, line 64
Code
function availability_calendar_styles_generate() {
if (variable_get('availability_calendar_styles_generate', 1)) {
$css_generator = new AvailabilityCalendarCssGenerator(availability_calendar_get_styles());
$result = $css_generator
->exec();
if ($result) {
drupal_set_message(t('A custom CSS file for availaibility calendar fields has been succesfully generated.'), 'status', FALSE);
}
else {
drupal_set_message(t('An error occurred while saving the generated CSS file for availability calendar fields.'), 'error', FALSE);
}
}
}