You are here

function finder_split_field in Finder 7

Same name and namespace in other branches
  1. 6 finder.module \finder_split_field()

Return info about a field.

Finder stores information about fields as "table-name.field-name", this is just a simple function to split the field string into the two parts for convenience.

Parameters

$field: A field value as given in the array keys returned from hook_finder_fields() implementations.

Return value

An array with keys 'field' and 'table'.

6 calls to finder_split_field()
finder_autocomplete_autocomplete in modules/finder_autocomplete/finder_autocomplete.module
Menu callback; get autocomplete suggestions.
finder_find_choices in ./finder.module
Postprocessing for returned finder_find options when mode is choices.
finder_find_query in ./finder.module
Build basic finder query arrays.
finder_optionwidgets_finder_element in modules/finder_optionwidgets/finder_optionwidgets.module
Implements hook_finder_element().
finder_views_finder_find in modules/finder_views/finder_views.module
Implements hook_finder_find().

... See full list

File

./finder.module, line 1217
The finder module.

Code

function finder_split_field($field) {
  $field_parts = explode('.', $field);
  $field_info['field'] = $field_parts[1];
  $field_info['table'] = $field_parts[0];
  return $field_info;
}