diff --git a/core/modules/system/system.module b/core/modules/system/system.module index 3053cb2ed4..95c975cafb 100644 --- a/core/modules/system/system.module +++ b/core/modules/system/system.module @@ -1468,32 +1468,3 @@ function system_modules_uninstalled($modules) { } } } - -/** - * Implements hook_ENTITY_TYPE_presave() for entity_form_display entities. - * - * Provides a BC layer for modules providing old configurations. - * - * @todo Remove this hook in Drupal 9.0.x. - */ -function system_entity_form_display_presave(EntityFormDisplayInterface $display) { - /** @var \Drupal\Core\Field\WidgetPluginManager $field_widget_manager */ - $field_widget_manager = \Drupal::service('plugin.manager.field.widget'); - - foreach ($display->getComponents() as $field_name => $component) { - if (empty($component['type'])) { - continue; - } - - $plugin_definition = $field_widget_manager->getDefinition($component['type'], FALSE); - if (!is_a($plugin_definition['class'], EntityReferenceAutocompleteWidget::class, TRUE)) { - continue; - } - - if (!isset($component['settings']['match_limit'])) { - @trigger_error('Any entity_reference_autocomplete component of an entity_form_display must have a match_limit setting. This BC layer will be removed before 9.0.0. See https://www.drupal.org/node/2863188', E_USER_DEPRECATED); - $component['settings']['match_limit'] = 10; - $display->setComponent($field_name, $component); - } - } -}