You are here

function theme_rolereference_tokens_all in Role Reference 6

Theme role reference fields that contain multiple values. E.g. the -all tokens. Rid values use the view argument "or" option (e.g. 1+3+8) others use a simple comma (e.g. admin,subscriber,guest);

Parameters

array $items Array of role values (e.g. rid or role names).:

string $type Type of values being processed, e.g. rid-all or role-all.:

Return value

The formated token string.

1 theme call to theme_rolereference_tokens_all()
rolereference_token_values in ./rolereference.module

File

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

Code

function theme_rolereference_tokens_all($items, $type = 'role-all') {
  switch ($type) {
    case 'rid-all':
      $token = implode('+', $items);

      // Use view argument or option.
      break;
    case 'role-all':
    default:
      $token = implode(',', $items);
  }
  return $token;
}