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

1 function implements 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.

email_field_formatter_info_alter in drupal/core/modules/field/modules/email/email.module
Implements hook_field_formatter_info_alter().

File

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

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';
}