|
21 | 21 | * label = @Translation("Entities") |
22 | 22 | * ), |
23 | 23 | * consumes = { |
24 | | - * "entity_type" = @ContextDefinition("string", |
| 24 | + * "type" = @ContextDefinition("string", |
25 | 25 | * label = @Translation("Entity type") |
26 | 26 | * ), |
27 | | - * "entity_ids" = @ContextDefinition("string", |
| 27 | + * "ids" = @ContextDefinition("any", |
28 | 28 | * label = @Translation("Identifier"), |
29 | 29 | * multiple = TRUE |
30 | 30 | * ), |
31 | | - * "entity_language" = @ContextDefinition("string", |
32 | | - * label = @Translation("Entity languages(s)"), |
| 31 | + * "language" = @ContextDefinition("string", |
| 32 | + * label = @Translation("Entity languages"), |
33 | 33 | * multiple = TRUE, |
34 | 34 | * required = FALSE |
35 | 35 | * ), |
36 | | - * "entity_bundle" = @ContextDefinition("string", |
| 36 | + * "bundles" = @ContextDefinition("any", |
37 | 37 | * label = @Translation("Entity bundle(s)"), |
38 | 38 | * multiple = TRUE, |
39 | 39 | * required = FALSE |
@@ -127,8 +127,9 @@ public function resolve($type, array $ids, $language = NULL, array $bundles = NU |
127 | 127 | return new Deferred(function () use ($type, $ids, $language, $bundles, $resolver, $context) { |
128 | 128 | /** @var \Drupal\Core\Entity\EntityInterface[] $entities */ |
129 | 129 | if (!$entities = $resolver()) { |
130 | | - // If there is no entity with this id, add the list cache tags so that the |
131 | | - // cache entry is purged whenever a new entity of this type is saved. |
| 130 | + // If there is no entity with this id, add the list cache tags so that |
| 131 | + // the cache entry is purged whenever a new entity of this type is |
| 132 | + // saved. |
132 | 133 | $type = $this->entityTypeManager->getDefinition($type); |
133 | 134 | /** @var \Drupal\Core\Entity\EntityTypeInterface $type */ |
134 | 135 | $tags = $type->getListCacheTags(); |
@@ -163,4 +164,5 @@ public function resolve($type, array $ids, $language = NULL, array $bundles = NU |
163 | 164 | return $entities; |
164 | 165 | }); |
165 | 166 | } |
| 167 | + |
166 | 168 | } |
0 commit comments