Loading core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php +1 −1 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ public static function validateEntityAutocomplete(array &$element, FormStateInte 'target_type' => $element['#target_type'], 'handler' => $element['#selection_handler'], ]; /** @var /Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface $handler */ /** @var \Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface $handler */ $handler = \Drupal::service('plugin.manager.entity_reference_selection')->getInstance($options); $autocreate = (bool) $element['#autocreate'] && $handler instanceof SelectionWithAutocreateInterface; Loading Loading
core/lib/Drupal/Core/Entity/Element/EntityAutocomplete.php +1 −1 Original line number Diff line number Diff line Loading @@ -202,7 +202,7 @@ public static function validateEntityAutocomplete(array &$element, FormStateInte 'target_type' => $element['#target_type'], 'handler' => $element['#selection_handler'], ]; /** @var /Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface $handler */ /** @var \Drupal\Core\Entity\EntityReferenceSelection\SelectionInterface $handler */ $handler = \Drupal::service('plugin.manager.entity_reference_selection')->getInstance($options); $autocreate = (bool) $element['#autocreate'] && $handler instanceof SelectionWithAutocreateInterface; Loading