You are here

function _textformatter_get_field_value_key in Text list formatter 7

Same name and namespace in other branches
  1. 8.2 textformatter.module \_textformatter_get_field_value_key()

Helper to return the value key for a field instance.

Parameters

$field array: The whole array of field instance info provided by the field api.

Return value

string The value key for the field.

1 call to _textformatter_get_field_value_key()
textformatter_default_field_create_list in ./textformatter.module
Default listing callback.

File

./textformatter.module, line 524
Provide a field formatter to render values as HTML or comma-separated lists.

Code

function _textformatter_get_field_value_key(array $field) {
  return array_key_exists('columns', $field) && is_array($field['columns']) ? key($field['columns']) : 'value';
}