function data_search_get_fields in Data 6
Same name and namespace in other branches
- 8 data_search/data_search.module \data_search_get_fields()
- 7 data_search/data_search.module \data_search_get_fields()
Gather all fields for a particular table which should be added to the search index.
3 calls to data_search_get_fields()
- data_search_admin_form in data_search/
data_search.admin.inc - Views handler configuration form.
- data_search_get_tables in data_search/
data_search.module - Gather all tables which might be eligible for searching.
- data_search_update_index in data_search/
data_search.module - Implementation of hook_update_index().
File
- data_search/
data_search.module, line 171
Code
function data_search_get_fields($table) {
$fields = array();
$schema = $table
->get('table_schema');
$meta = $table
->get('meta');
foreach (array_keys($schema['fields']) as $field_name) {
if (!empty($meta['fields'][$field_name]['search'])) {
$fields[] = db_escape_table($field_name);
}
}
return $fields;
}