You are here

function field_limiter_field_formatter_info_alter in Field Limiter 8

Implements hook_field_formatter_info_alter().

File

./field_limiter.module, line 11
Hook implementations for the Field Limiter module.

Code

function field_limiter_field_formatter_info_alter(array &$info) {

  /** @var \Drupal\Core\Field\FieldTypePluginManagerInterface $field_type_manager */
  $field_type_manager = \Drupal::service('plugin.manager.field.field_type');
  $field_types = array_keys($field_type_manager
    ->getDefinitions());
  $info['field_limiter']['field_types'] = $field_types;
}