function LocaleTestHooks::entityExtraFieldInfo

Implements hook_entity_extra_field_info().

Attributes

#[Hook('entity_extra_field_info')]

File

core/modules/locale/tests/modules/locale_test/src/Hook/LocaleTestHooks.php, line 227

Class

LocaleTestHooks
Hook implementations for locale_test.

Namespace

Drupal\locale_test\Hook

Code

public function entityExtraFieldInfo() : array {
  $fields['user']['user']['display']['translatable_text'] = [
    'label' => $this->t('Translatable text'),
    'description' => $this->t('Test translatable text displayed on user profile.'),
    'weight' => 5,
  ];
  return $fields;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.