33namespace Drupal \graphql \Controller ;
44
55use Drupal \Core \DependencyInjection \ContainerInjectionInterface ;
6+ use Drupal \Core \Extension \ModuleExtensionList ;
67use Drupal \Core \Extension \ModuleHandlerInterface ;
78use Drupal \Core \StringTranslation \StringTranslationTrait ;
89use Drupal \graphql \Plugin \SchemaPluginManager ;
@@ -26,12 +27,20 @@ class SchemaOverviewController implements ContainerInjectionInterface {
2627 */
2728 protected $ moduleHandler ;
2829
30+ /**
31+ * The module extension list service.
32+ *
33+ * @var \Drupal\Core\Extension\ModuleExtensionList
34+ */
35+ protected $ moduleExtensionList ;
36+
2937 /**
3038 * {@inheritdoc}
3139 */
3240 public static function create (ContainerInterface $ container ) {
3341 return new static (
3442 $ container ->get ('module_handler ' ),
43+ $ container ->get ('extension.list.module ' ),
3544 $ container ->get ('plugin.manager.graphql.schema ' )
3645 );
3746 }
@@ -40,12 +49,15 @@ public static function create(ContainerInterface $container) {
4049 * SchemaOverviewController constructor.
4150 *
4251 * @param \Drupal\Core\Extension\ModuleHandlerInterface $moduleHandler
43- * The module handler srevice.
52+ * The module handler service.
53+ * @param \Drupal\Core\Extension\ModuleExtensionList $moduleExtensionList
54+ * The module extension list service
4455 * @param \Drupal\graphql\Plugin\SchemaPluginManager $schemaManager
4556 * The schema plugin manager service.
4657 */
47- public function __construct (ModuleHandlerInterface $ moduleHandler , SchemaPluginManager $ schemaManager ) {
58+ public function __construct (ModuleHandlerInterface $ moduleHandler , ModuleExtensionList $ moduleExtensionList , SchemaPluginManager $ schemaManager ) {
4859 $ this ->schemaManager = $ schemaManager ;
60+ $ this ->moduleExtensionList = $ moduleExtensionList ;
4961 $ this ->moduleHandler = $ moduleHandler ;
5062 }
5163
@@ -74,7 +86,7 @@ public function listSchemas() {
7486 ];
7587
7688 $ table ["schema: $ key " ]['provider ' ] = [
77- '#plain_text ' => $ this ->moduleHandler ->getName ($ definition ['provider ' ]),
89+ '#plain_text ' => $ this ->moduleExtensionList ->getName ($ definition ['provider ' ]),
7890 ];
7991
8092 $ table ["schema: $ key " ]['operations ' ] = $ this ->buildOperations ($ key , $ definition );
0 commit comments