function hook_field_formatter_info_alter

Perform alterations on Field API formatter types.

Parameters

array $info: An array of informations on existing formatter types, as collected by the annotation discovery mechanism.

Related topics

3 functions implement hook_field_formatter_info_alter()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

edit_field_formatter_info_alter in drupal/core/modules/edit/edit.module
Implements hook_field_formatter_info_alter().
email_field_formatter_info_alter in drupal/core/modules/email/email.module
Implements hook_field_formatter_info_alter().
telephone_field_formatter_info_alter in drupal/core/modules/telephone/telephone.module
Implements hook_field_formatter_info_alter().

File

drupal/core/modules/field/field.api.php, line 820

Code

function hook_field_formatter_info_alter(array &$info) {

  // Add a setting to a formatter type.
  $info['text_default']['settings'] += array(
    'mymodule_additional_setting' => 'default value',
  );

  // Let a new field type re-use an existing formatter.
  $info['text_default']['field types'][] = 'my_field_type';
}