function views_ui::list_filter in Views (for Drupal 7) 7.3
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
TRUE if the item should be excluded.
Overrides ctools_export_ui::list_filter
File
- plugins/
export_ui/ views_ui.class.php, line 179 - Contains the CTools Export UI integration code.
Class
- views_ui
- CTools Export UI class handler for Views UI.
Code
function list_filter($form_state, $view) {
// Don't filter by tags if all is set up.
if ($form_state['values']['tag'] != 'all') {
// If none is selected check whether the view has a tag.
if ($form_state['values']['tag'] == 'none') {
return !empty($view->tag);
}
else {
// Check whether the tag can be found in the views tag.
return strpos($view->tag, $form_state['values']['tag']) === FALSE;
}
}
if ($form_state['values']['base'] != 'all' && $form_state['values']['base'] != $view->base_table) {
return TRUE;
}
return parent::list_filter($form_state, $view);
}