function finder_views_finder_fields in Finder 7
Same name and namespace in other branches
- 6 modules/finder_views/finder_views.module \finder_views_finder_fields()
Implements hook_finder_fields().
See also
hook_finder_fields()
1 call to finder_views_finder_fields()
- finder_views_form_finder_admin_edit_alter in modules/
finder_views/ finder_views.module - Implements hook_form_FORM_ID_alter().
File
- modules/
finder_views/ finder_views.module, line 276 - The finder views module.
Code
function finder_views_finder_fields($finder, $finder_element_id) {
if ($view = views_get_view($finder->settings['views']['view'])) {
views_include('admin');
$display = $view
->add_display('finder_views');
$view
->set_display($display);
$base_tables = $view
->get_base_tables();
$views_fields = views_fetch_fields(array_keys($base_tables), 'filter');
$options = array();
foreach ($views_fields as $k => $v) {
$options[$v['group']][$k] = $v['title'];
}
return $options;
}
return FALSE;
}