function FieldTestHooks::entityReferenceSelectionAlter

Implements hook_entity_reference_selection_alter().

File

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

Class

FieldTestHooks
Hook implementations for field_test.

Namespace

Drupal\field_test\Hook

Code

public function entityReferenceSelectionAlter(array &$definitions) : void {
    if (\Drupal::state()->get('field_test_disable_broken_entity_reference_handler')) {
        unset($definitions['broken']);
    }
}

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