You are here

function rolereference_allowed_values in Role Reference 6

Implementation of hook_allowed_values().

File

./rolereference.module, line 638
Defines a field type for referencing a role. Based almost entirely on nodereference and userreference modules.

Code

function rolereference_allowed_values($field) {
  $references = _rolereference_potential_references($field);
  $options = array();
  foreach ($references as $key => $value) {

    // Views theming runs check_plain (htmlentities) on the values.
    // We reverse that with html_entity_decode.
    $options[$key] = html_entity_decode(strip_tags($value['rendered']), ENT_QUOTES);
  }
  return $options;
}