| Conditions | 2 |
| Paths | 2 |
| Total Lines | 12 |
| Code Lines | 6 |
| Lines | 12 |
| Ratio | 100 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 35 | public function getBaseQuery($value, array $args, ResolveInfo $info) { |
||
| 36 | if ($value instanceof EntityInterface) { |
||
| 37 | $query = parent::getBaseQuery($value, $args, $info); |
||
| 38 | |||
| 39 | // Add the entity id as a filter condition. |
||
| 40 | $key = $value->getEntityType()->getKey('id'); |
||
| 41 | $query->condition($key, $value->id()); |
||
| 42 | |||
| 43 | // Mark the query as a revision query. |
||
| 44 | return $this->applyRevisionsMode($query, 'all'); |
||
| 45 | } |
||
| 46 | } |
||
| 47 | |||
| 49 |