Loading core/lib/Drupal/Core/Entity/Controller/EntityController.php +1 −4 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; /** * Provides the add-page and title callbacks for entities. Loading Loading @@ -47,7 +46,6 @@ public function __construct( TranslationInterface $stringTranslation, protected readonly UrlGeneratorInterface $urlGenerator, protected readonly RouteMatchInterface $routeMatch, protected readonly RequestStack $requestStack, ) { $this->stringTranslation = $stringTranslation; } Loading @@ -64,7 +62,6 @@ public static function create(ContainerInterface $container) { $container->get('string_translation'), $container->get('url_generator'), $container->get('current_route_match'), $container->get('request_stack'), ); } Loading Loading @@ -106,7 +103,7 @@ protected function redirect($route_name, array $route_parameters = [], array $op public function addPage($entity_type_id, ?Request $request = NULL) { if ($request === NULL) { @trigger_error('Calling ' . __METHOD__ . ' without the $request parameter is deprecated in drupal:11.3.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3467748', E_USER_DEPRECATED); $request = $this->requestStack->getCurrentRequest(); $request = \Drupal::requestStack()->getCurrentRequest(); } $entity_type = $this->entityTypeManager->getDefinition($entity_type_id); $bundles = $this->entityTypeBundleInfo->getBundleInfo($entity_type_id); Loading Loading
core/lib/Drupal/Core/Entity/Controller/EntityController.php +1 −4 Original line number Diff line number Diff line Loading @@ -19,7 +19,6 @@ use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\HttpFoundation\RedirectResponse; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; /** * Provides the add-page and title callbacks for entities. Loading Loading @@ -47,7 +46,6 @@ public function __construct( TranslationInterface $stringTranslation, protected readonly UrlGeneratorInterface $urlGenerator, protected readonly RouteMatchInterface $routeMatch, protected readonly RequestStack $requestStack, ) { $this->stringTranslation = $stringTranslation; } Loading @@ -64,7 +62,6 @@ public static function create(ContainerInterface $container) { $container->get('string_translation'), $container->get('url_generator'), $container->get('current_route_match'), $container->get('request_stack'), ); } Loading Loading @@ -106,7 +103,7 @@ protected function redirect($route_name, array $route_parameters = [], array $op public function addPage($entity_type_id, ?Request $request = NULL) { if ($request === NULL) { @trigger_error('Calling ' . __METHOD__ . ' without the $request parameter is deprecated in drupal:11.3.0 and it will be required in drupal:12.0.0. See https://www.drupal.org/node/3467748', E_USER_DEPRECATED); $request = $this->requestStack->getCurrentRequest(); $request = \Drupal::requestStack()->getCurrentRequest(); } $entity_type = $this->entityTypeManager->getDefinition($entity_type_id); $bundles = $this->entityTypeBundleInfo->getBundleInfo($entity_type_id); Loading