function FieldTestHooks::fieldInfoEntityTypeUiDefinitionsAlter

Same name and namespace in other branches
  1. main core/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php \Drupal\field_test\Hook\FieldTestHooks::fieldInfoEntityTypeUiDefinitionsAlter()

Implements hook_field_info_entity_type_ui_definitions_alter().

Attributes

#[Hook('field_info_entity_type_ui_definitions_alter')]

File

core/modules/field/tests/modules/field_test/src/Hook/FieldTestHooks.php, line 135

Class

FieldTestHooks
Hook implementations for field_test.

Namespace

Drupal\field_test\Hook

Code

public function fieldInfoEntityTypeUiDefinitionsAlter(array &$ui_definitions, string $entity_type_id) : void {
  if ($entity_type_id === 'node') {
    $ui_definitions['boolean']['label'] = new TranslatableMarkup('Boolean (overridden by alter)');
  }
}

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