| Conditions | 1 |
| Paths | 1 |
| Total Lines | 13 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | public function getCurrentDataTrackerByClassAndId(string $className, $objectId): ?CurrentDataTrackerInterface |
||
| 17 | { |
||
| 18 | $elasticContext = $this->elasticsearchContextFactory->create($className); |
||
| 19 | |||
| 20 | $body = [ |
||
| 21 | 'query' => ['term' => ['objectId' => $objectId]], |
||
| 22 | ]; |
||
| 23 | |||
| 24 | //todo move class to config |
||
| 25 | return $this->elasticsearchService->getItemByQuery( |
||
| 26 | $elasticContext->getCurrentDataTrackerIndex(), |
||
| 27 | CurrentDataTracker::class, |
||
| 28 | $body |
||
| 29 | ); |
||
| 32 |