@@ -37,7 +37,7 @@ class QueryArticles extends DataProducerPluginBase implements ContainerFactoryPl
37
37
/**
38
38
* @var \Drupal\Core\Entity\EntityTypeManagerInterface
39
39
*/
40
- protected $ entityManager ;
40
+ protected $ entityTypeManager ;
41
41
42
42
/**
43
43
* {@inheritdoc}
@@ -49,7 +49,7 @@ public static function create(ContainerInterface $container, array $configuratio
49
49
$ configuration ,
50
50
$ plugin_id ,
51
51
$ plugin_definition ,
52
- $ container ->get ('entity .manager ' )
52
+ $ container ->get ('entity_type .manager ' )
53
53
);
54
54
}
55
55
@@ -62,18 +62,18 @@ public static function create(ContainerInterface $container, array $configuratio
62
62
* The plugin id.
63
63
* @param mixed $pluginDefinition
64
64
* The plugin definition.
65
- * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityManager
65
+ * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager
66
66
*
67
67
* @codeCoverageIgnore
68
68
*/
69
69
public function __construct (
70
70
array $ configuration ,
71
71
$ pluginId ,
72
72
$ pluginDefinition ,
73
- EntityTypeManagerInterface $ entityManager
73
+ EntityTypeManagerInterface $ entityTypeManager
74
74
) {
75
75
parent ::__construct ($ configuration , $ pluginId , $ pluginDefinition );
76
- $ this ->entityManager = $ entityManager ;
76
+ $ this ->entityTypeManager = $ entityTypeManager ;
77
77
}
78
78
79
79
/**
@@ -90,17 +90,17 @@ public function resolve($offset, $limit, RefinableCacheableDependencyInterface $
90
90
throw new UserError (sprintf ('Exceeded maximum query limit: %s. ' , static ::MAX_LIMIT ));
91
91
}
92
92
93
- $ storage = $ this ->entityManager ->getStorage ('node ' );
94
- $ type = $ storage ->getEntityType ();
93
+ $ storage = $ this ->entityTypeManager ->getStorage ('node ' );
94
+ $ entityType = $ storage ->getEntityType ();
95
95
$ query = $ storage ->getQuery ()
96
96
->currentRevision ()
97
97
->accessCheck ();
98
98
99
- $ query ->condition ($ type ->getKey ('bundle ' ), 'article ' );
99
+ $ query ->condition ($ entityType ->getKey ('bundle ' ), 'article ' );
100
100
$ query ->range ($ offset , $ limit );
101
101
102
- $ metadata ->addCacheTags ($ type ->getListCacheTags ());
103
- $ metadata ->addCacheContexts ($ type ->getListCacheContexts ());
102
+ $ metadata ->addCacheTags ($ entityType ->getListCacheTags ());
103
+ $ metadata ->addCacheContexts ($ entityType ->getListCacheContexts ());
104
104
105
105
return new QueryConnection ($ query );
106
106
}
0 commit comments