diff --git a/modules/apigee_edge_teams/src/Entity/ListBuilder/TeamAppListByTeam.php b/modules/apigee_edge_teams/src/Entity/ListBuilder/TeamAppListByTeam.php index ae9819fa..039f3fe2 100644 --- a/modules/apigee_edge_teams/src/Entity/ListBuilder/TeamAppListByTeam.php +++ b/modules/apigee_edge_teams/src/Entity/ListBuilder/TeamAppListByTeam.php @@ -20,6 +20,7 @@ namespace Drupal\apigee_edge_teams\Entity\ListBuilder; +use Drupal\apigee_edge\Entity\AppWarningsCheckerInterface; use Drupal\apigee_edge\Entity\ListBuilder\AppListBuilder; use Drupal\Component\Datetime\TimeInterface; use Drupal\Core\Config\ConfigFactoryInterface; @@ -62,13 +63,15 @@ class TeamAppListByTeam extends AppListBuilder implements ContainerInjectionInte * The route match object. * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. + * @param \Drupal\apigee_edge\Entity\AppWarningsCheckerInterface $app_warnings_checker + * The app warnings checker service. */ - public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, RendererInterface $render, RequestStack $request_stack, TimeInterface $time, RouteMatchInterface $route_match, ConfigFactoryInterface $config_factory = NULL) { + public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, RendererInterface $render, RequestStack $request_stack, TimeInterface $time, RouteMatchInterface $route_match, ConfigFactoryInterface $config_factory = NULL, AppWarningsCheckerInterface $app_warnings_checker) { if (!$config_factory) { $config_factory = \Drupal::service('config.factory'); } - parent::__construct($entity_type, $entity_type_manager, $render, $request_stack, $time, $config_factory); + parent::__construct($entity_type, $entity_type_manager, $render, $request_stack, $time, $config_factory, $app_warnings_checker); $this->routeMatch = $route_match; } @@ -83,7 +86,8 @@ public static function createInstance(ContainerInterface $container, EntityTypeI $container->get('request_stack'), $container->get('datetime.time'), $container->get('current_route_match'), - $container->get('config.factory') + $container->get('config.factory'), + $container->get('apigee_edge.entity.app_warnings_checker') ); } diff --git a/src/Entity/ListBuilder/AppListBuilder.php b/src/Entity/ListBuilder/AppListBuilder.php index 274c3ac2..c1263f6e 100644 --- a/src/Entity/ListBuilder/AppListBuilder.php +++ b/src/Entity/ListBuilder/AppListBuilder.php @@ -94,14 +94,10 @@ class AppListBuilder extends EdgeEntityListBuilder { * @param \Drupal\apigee_edge\Entity\AppWarningsCheckerInterface $app_warnings_checker * The app warnings checker service. */ - public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, RendererInterface $renderer, RequestStack $request_stack, TimeInterface $time, ConfigFactoryInterface $config_factory = NULL, AppWarningsCheckerInterface $app_warnings_checker = NULL) { + public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, RendererInterface $renderer, RequestStack $request_stack, TimeInterface $time, ConfigFactoryInterface $config_factory = NULL, AppWarningsCheckerInterface $app_warnings_checker) { if (!$config_factory) { $config_factory = \Drupal::service('config.factory'); } - if (!$app_warnings_checker) { - @trigger_error('Calling ' . __METHOD__ . ' without the $app_warnings_checker is deprecated in apigee_edge:8-x-1.18 and is required before apigee_edge:8.x-2.0. See https://github.com/apigee/apigee-edge-drupal/pull/507', E_USER_DEPRECATED); - $app_warnings_checker = \Drupal::service('apigee_edge.entity.app_warnings_checker'); - } parent::__construct($entity_type, $entity_type_manager, $config_factory); $this->renderer = $renderer; @@ -121,7 +117,8 @@ public static function createInstance(ContainerInterface $container, EntityTypeI $container->get('renderer'), $container->get('request_stack'), $container->get('datetime.time'), - $container->get('config.factory') + $container->get('config.factory'), + $container->get('apigee_edge.entity.app_warnings_checker') ); } diff --git a/src/Entity/ListBuilder/DeveloperAppListBuilderForDeveloper.php b/src/Entity/ListBuilder/DeveloperAppListBuilderForDeveloper.php index 956c9b9c..afe9cd00 100644 --- a/src/Entity/ListBuilder/DeveloperAppListBuilderForDeveloper.php +++ b/src/Entity/ListBuilder/DeveloperAppListBuilderForDeveloper.php @@ -21,6 +21,7 @@ namespace Drupal\apigee_edge\Entity\ListBuilder; use Drupal\apigee_edge\Entity\AppInterface; +use Drupal\apigee_edge\Entity\AppWarningsCheckerInterface; use Drupal\apigee_edge\Exception\DeveloperDoesNotExistException; use Drupal\Component\Datetime\TimeInterface; use Drupal\Component\Utility\Html; @@ -85,13 +86,15 @@ class DeveloperAppListBuilderForDeveloper extends AppListBuilder implements Cont * The route match object. * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory * The config factory. + * @param \Drupal\apigee_edge\Entity\AppWarningsCheckerInterface $app_warnings_checker + * The app warnings checker service. */ - public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, RendererInterface $render, RequestStack $request_stack, TimeInterface $time, AccountInterface $current_user, RouteMatchInterface $route_match, ConfigFactoryInterface $config_factory = NULL) { + public function __construct(EntityTypeInterface $entity_type, EntityTypeManagerInterface $entity_type_manager, RendererInterface $render, RequestStack $request_stack, TimeInterface $time, AccountInterface $current_user, RouteMatchInterface $route_match, ConfigFactoryInterface $config_factory = NULL, AppWarningsCheckerInterface $app_warnings_checker) { if (!$config_factory) { $config_factory = \Drupal::service('config.factory'); } - parent::__construct($entity_type, $entity_type_manager, $render, $request_stack, $time, $config_factory); + parent::__construct($entity_type, $entity_type_manager, $render, $request_stack, $time, $config_factory, $app_warnings_checker); $this->currentUser = $current_user; $this->routeMatch = $route_match; } @@ -108,7 +111,8 @@ public static function createInstance(ContainerInterface $container, EntityTypeI $container->get('datetime.time'), $container->get('current_user'), $container->get('current_route_match'), - $container->get('config.factory') + $container->get('config.factory'), + $container->get('apigee_edge.entity.app_warnings_checker') ); }