function FieldTestHooks::entityExtraFieldInfoAlter

Implements hook_entity_extra_field_info_alter().

File

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

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.