public function AvailabilityCalendarsNodeEditCalendarFormHandler::submit in Availability Calendars 7.2
Callback to process form submission for the styles form.
File
- ./
availability_calendars.node.inc, line 481
Class
Code
public function submit($form, &$form_state) {
$op = isset($form_state['values']['op']) ? $form_state['values']['op'] : '';
if ($op == t('Update')) {
foreach ($this->commands as $command) {
availability_calendars_update_node_states_range($this->settings->calendar_id, $command['from'], $command['to'], $command['state']);
}
// Redirect to node view (as is also done on the node edit form).
$form_state['redirect'] = 'node/' . $this->node->nid;
// Clear the page and block caches (don't regress #747992).
entity_get_controller('node')
->resetCache(array(
$this->settings->calendar_id,
));
cache_clear_all();
drupal_set_message(t('Availability information saved.'));
}
}