function hook_entity_reference_selection_alter
Modify the list of available entity reference plugins.
This hook may be used to modify plugin properties after they have been specified by other modules.
Parameters
array $plugins: An array of all the existing plugin definitions, passed by reference.
See also
\Drupal\Core\Entity\EntityReferenceSelection\SelectionPluginManager
Related topics
1 function implements hook_entity_reference_selection_alter()
Note: the procedural functions in this list are found by pattern matching, so the list may include some functions that are not actually implementations of this hook.
- FieldTestHooks::entityReferenceSelectionAlter in core/
modules/ field/ tests/ modules/ field_test/ src/ Hook/ FieldTestHooks.php - Implements hook_entity_reference_selection_alter().
File
-
core/
lib/ Drupal/ Core/ Entity/ entity.api.php, line 2410
Code
function hook_entity_reference_selection_alter(array &$plugins) : void {
// Remove a plugin.
unset($plugins['broken']);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.