You are here

formatter_field.module in Formatter Field 8

Same filename and directory in other branches
  1. 7 formatter_field.module

Primary module hooks for Formatter field module.

File

formatter_field.module
View source
<?php

/**
 * @file
 * Primary module hooks for Formatter field module.
 */

/**
 * Implements hook_field_formatter_info_alter().
 */
function formatter_field_field_formatter_info_alter(array &$info) {
  $manager = \Drupal::service('plugin.manager.field.field_type');
  foreach ($manager
    ->getDefinitions() as $field_type => $field_definition) {
    if ($field_definition['id'] != 'formatter_field_formatter') {
      $info['formatter_field_from']['field_types'][] = $field_type;
    }
  }
}