public function UltimateCronDatabaseLogger::settingsFormSubmit in Ultimate Cron 7.2
Submit handler.
Overrides UltimateCronPlugin::settingsFormSubmit
File
- plugins/
ultimate_cron/ logger/ database.class.php, line 250 - Database logger for Ultimate Cron.
Class
- UltimateCronDatabaseLogger
- Class for using database as log storage.
Code
public function settingsFormSubmit(&$form, &$form_state, $job = NULL) {
$values =& $form_state['values']['settings'][$this->type][$this->name];
$defaults =& $form_state['default_values']['settings'][$this->type][$this->name];
if (!$job) {
return;
}
$method = $values['method'] ? $values['method'] : $defaults['method'];
// Cleanup form (can this be done elsewhere?)
switch ($method) {
case ULTIMATE_CRON_DATABASE_LOGGER_CLEANUP_METHOD_DISABLED:
unset($values['expire']);
unset($values['retain']);
break;
case ULTIMATE_CRON_DATABASE_LOGGER_CLEANUP_METHOD_EXPIRE:
unset($values['retain']);
break;
case ULTIMATE_CRON_DATABASE_LOGGER_CLEANUP_METHOD_RETAIN:
unset($values['expire']);
break;
}
}