You are here

function _textformatter_field_info in Text list formatter 7

Returns an array of info to add to hook_field_formatter_info().

Return value

array An array of fields and settings from hook_textformatter_field_info data.

1 call to _textformatter_field_info()
textformatter_field_formatter_info in ./textformatter.module
Implements hook_field_formatter_info().

File

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

Code

function _textformatter_field_info() {

  // Invokes hook_textformatter_field_info
  $textformatter_info = textformatter_field_list_info();
  $field_info = array(
    'fields' => array(),
    'settings' => array(),
  );

  // Create array of all field types and default settings..
  foreach ($textformatter_info as $module => $info) {
    $field_info['fields'] = array_merge($field_info['fields'], $info['fields']);
    if (isset($info['settings']) && is_array($info['settings'])) {
      $field_info['settings'] = array_merge($field_info['settings'], $info['settings']);
    }
  }
  return $field_info;
}