public function ultimate_cron_job_ctools_export_ui::list_filter in Ultimate Cron 7.2
Determine if a row should be filtered out.
This handles the default filters for the export UI list form. If you added additional filters in list_form() then this is where you should handle them.
Return value
bool TRUE if the item should be excluded.
Overrides ctools_export_ui::list_filter
1 call to ultimate_cron_job_ctools_export_ui::list_filter()
- ultimate_cron_job_ctools_export_ui::list_form_submit in plugins/
ctools/ export_ui/ ultimate_cron_job_ctools_export_ui.class.php - Submit the filter/sort form.
File
- plugins/
ctools/ export_ui/ ultimate_cron_job_ctools_export_ui.class.php, line 353 - Export-ui handler for the Ultimate Cron jobs.
Class
- ultimate_cron_job_ctools_export_ui
- Class for cTools Export UI.
Code
public function list_filter($form_state, $item) {
$schema = ctools_export_get_schema($this->plugin['schema']);
if ($form_state['values']['storage'] != 'all' && $form_state['values']['storage'] != $item->{$schema['export']['export type string']}) {
return TRUE;
}
if ($form_state['values']['module'] != 'all' && $form_state['values']['module'] != $item->hook['module']) {
return TRUE;
}
$item->log_entry = isset($item->log_entry) ? $item->log_entry : $item
->loadLatestLogEntry();
$item->lock_id = isset($item->lock_id) ? $item->lock_id : $item
->isLocked();
if ($form_state['values']['status'] == 'running') {
if (!$item->lock_id) {
return TRUE;
}
}
elseif ($form_state['values']['status'] != 'all' && $form_state['values']['status'] != $item->log_entry->severity) {
return TRUE;
}
if ($form_state['values']['disabled'] != 'all' && $form_state['values']['disabled'] != !empty($item->disabled)) {
return TRUE;
}
if ($form_state['values']['search']) {
$search = strtolower($form_state['values']['search']);
foreach ($this
->list_search_fields() as $field) {
if (strpos(strtolower($item->{$field}), $search) !== FALSE) {
$hit = TRUE;
break;
}
}
if (empty($hit)) {
return TRUE;
}
}
}