You are here

public function EditableFieldsHelper::formatterInfoAlter in Editable Fields 8

Same name and namespace in other branches
  1. 1.0.x src/services/EditableFieldsHelper.php \Drupal\editablefields\services\EditableFieldsHelper::formatterInfoAlter()

Make "editablefields" formatter available for all the field types.

Parameters

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

Overrides EditableFieldsHelperInterface::formatterInfoAlter

File

src/services/EditableFieldsHelper.php, line 68

Class

EditableFieldsHelper
Class EditableFieldsHelper.

Namespace

Drupal\editablefields\services

Code

public function formatterInfoAlter(array &$info) {
  if (empty($info[self::FORMATTER_ID])) {
    return;
  }
  $info[self::FORMATTER_ID]['field_types'] = $this
    ->getAllFieldTypes();
}