function _field_reference_options in Field reference 7
Builds a list of referenceable fields suitable for the '#option' FAPI property.
Parameters
$field: The field definition.
$instance: The instance (may be NULL!)
Return value
An array of referenceable field titles, keyed by field reference id.
2 calls to _field_reference_options()
- field_reference_options_list in ./
field_reference.module - Implements hook_options_list().
- field_reference_views_options in ./
field_reference.module - Helper callback for the views_handler_filter_in_operator filter.
File
- ./
field_reference.module, line 579 - Defines a field type for referencing a field from another.
Code
function _field_reference_options($field, $instance) {
$references = field_reference_potential_references($field, $instance);
$options = array();
foreach ($references as $key => $value) {
$options[$key] = html_entity_decode(strip_tags($value), ENT_QUOTES);
}
natcasesort($options);
return $options;
}