Skip to content

Commit 8373105

Browse files
smithmilnerfubhy
authored andcommitted
Using interface instead of EntityTypeManager class directly. (#889)
1 parent ac13da9 commit 8373105

4 files changed

Lines changed: 14 additions & 14 deletions

File tree

src/Plugin/GraphQL/DataProducer/Entity/EntityLoad.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Drupal\graphql\Plugin\GraphQL\DataProducer\Entity;
44

55
use Drupal\Core\Entity\EntityRepositoryInterface;
6-
use Drupal\Core\Entity\EntityTypeManager;
6+
use Drupal\Core\Entity\EntityTypeManagerInterface;
77
use Drupal\Core\Entity\TranslatableInterface;
88
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
99
use Drupal\graphql\GraphQL\Buffers\EntityBuffer;
@@ -45,7 +45,7 @@ class EntityLoad extends DataProducerPluginBase implements ContainerFactoryPlugi
4545
/**
4646
* The entity type manager service.
4747
*
48-
* @var \Drupal\Core\Entity\EntityTypeManager
48+
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
4949
*/
5050
protected $entityTypeManager;
5151

@@ -88,7 +88,7 @@ public static function create(ContainerInterface $container, array $configuratio
8888
* The plugin id.
8989
* @param array $pluginDefinition
9090
* The plugin definition array.
91-
* @param \Drupal\Core\Entity\EntityTypeManager $entityTypeManager
91+
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
9292
* The entity type manager service.
9393
* @param \Drupal\Core\Entity\EntityRepositoryInterface $entityRepository
9494
* The entity repository service.
@@ -101,7 +101,7 @@ public function __construct(
101101
$configuration,
102102
$pluginId,
103103
$pluginDefinition,
104-
EntityTypeManager $entityTypeManager,
104+
EntityTypeManagerInterface $entityTypeManager,
105105
EntityRepositoryInterface $entityRepository,
106106
EntityBuffer $entityBuffer
107107
) {

src/Plugin/GraphQL/DataProducer/Entity/EntityLoadByUuid.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Drupal\graphql\Plugin\GraphQL\DataProducer\Entity;
44

55
use Drupal\Core\Entity\EntityRepositoryInterface;
6-
use Drupal\Core\Entity\EntityTypeManager;
6+
use Drupal\Core\Entity\EntityTypeManagerInterface;
77
use Drupal\Core\Entity\TranslatableInterface;
88
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
99
use Drupal\graphql\GraphQL\Buffers\EntityUuidBuffer;
@@ -45,7 +45,7 @@ class EntityLoadByUuid extends DataProducerPluginBase implements ContainerFactor
4545
/**
4646
* The entity type manager service.
4747
*
48-
* @var \Drupal\Core\Entity\EntityTypeManager
48+
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
4949
*/
5050
protected $entityTypeManager;
5151

@@ -88,7 +88,7 @@ public static function create(ContainerInterface $container, array $configuratio
8888
* The plugin id.
8989
* @param array $pluginDefinition
9090
* The plugin definition array.
91-
* @param \Drupal\Core\Entity\EntityTypeManager $entityTypeManager
91+
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
9292
* The entity type manager service.
9393
* @param \Drupal\Core\Entity\EntityRepositoryInterface $entityRepository
9494
* The entity repository service.
@@ -101,7 +101,7 @@ public function __construct(
101101
$configuration,
102102
$pluginId,
103103
$pluginDefinition,
104-
EntityTypeManager $entityTypeManager,
104+
EntityTypeManagerInterface $entityTypeManager,
105105
EntityRepositoryInterface $entityRepository,
106106
EntityUuidBuffer $entityBuffer
107107
) {

src/Plugin/GraphQL/DataProducer/Entity/EntityLoadMultiple.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace Drupal\graphql\Plugin\GraphQL\DataProducer\Entity;
44

55
use Drupal\Core\Entity\EntityRepositoryInterface;
6-
use Drupal\Core\Entity\EntityTypeManager;
6+
use Drupal\Core\Entity\EntityTypeManagerInterface;
77
use Drupal\Core\Entity\TranslatableInterface;
88
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
99
use Drupal\graphql\GraphQL\Buffers\EntityBuffer;
@@ -46,7 +46,7 @@ class EntityLoadMultiple extends DataProducerPluginBase implements ContainerFact
4646
/**
4747
* The entity type manager service.
4848
*
49-
* @var \Drupal\Core\Entity\EntityTypeManager
49+
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
5050
*/
5151
protected $entityTypeManager;
5252

@@ -89,7 +89,7 @@ public static function create(ContainerInterface $container, array $configuratio
8989
* The plugin id.
9090
* @param array $pluginDefinition
9191
* The plugin definition array.
92-
* @param \Drupal\Core\Entity\EntityTypeManager $entityTypeManager
92+
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
9393
* The entity type manager service.
9494
* @param \Drupal\Core\Entity\EntityRepositoryInterface $entityRepository
9595
* The entity repository service.
@@ -102,7 +102,7 @@ public function __construct(
102102
$configuration,
103103
$pluginId,
104104
$pluginDefinition,
105-
EntityTypeManager $entityTypeManager,
105+
EntityTypeManagerInterface $entityTypeManager,
106106
EntityRepositoryInterface $entityRepository,
107107
EntityBuffer $entityBuffer
108108
) {

src/Plugin/GraphQL/DataProducer/Field/EntityReference.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ public static function create(ContainerInterface $container, array $configuratio
9191
* The plugin id.
9292
* @param array $pluginDefinition
9393
* The plugin definition array.
94-
* @param \Drupal\Core\Entity\EntityTypeManager $entityTypeManager
94+
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
9595
* The entity type manager service.
9696
* @param \Drupal\Core\Entity\EntityRepositoryInterface $entityRepository
9797
* The entity repository service.
@@ -104,7 +104,7 @@ public function __construct(
104104
$configuration,
105105
$pluginId,
106106
$pluginDefinition,
107-
EntityTypeManager $entityTypeManager,
107+
EntityTypeManagerInterface $entityTypeManager,
108108
EntityRepositoryInterface $entityRepository,
109109
EntityBuffer $entityBuffer
110110
) {

0 commit comments

Comments
 (0)