function FieldTestHooks::entityExtraFieldInfoAlter

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

Implements hook_entity_extra_field_info_alter().

Attributes

#[Hook('entity_extra_field_info_alter')]

File

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

Class

FieldTestHooks
Hook implementations for field_test.

Namespace

Drupal\field_test\Hook

Code

public function entityExtraFieldInfoAlter(&$info) : void {
  // Remove all extra fields from the 'no_fields' content type.
  unset($info['node']['no_fields']);
}

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