1 | <?php |
||
10 | class JsonQueryMapQueryProvider implements QueryProviderInterface { |
||
11 | |||
12 | /** |
||
13 | * The cache backend for storing query map file paths. |
||
14 | * |
||
15 | * @var \Drupal\Core\Cache\CacheBackendInterface |
||
16 | */ |
||
17 | protected $cacheBackend; |
||
18 | |||
19 | /** |
||
20 | * The paths to use for finding query maps. |
||
21 | * |
||
22 | * @var string[] |
||
23 | */ |
||
24 | protected $lookupPaths; |
||
25 | |||
26 | /** |
||
27 | * QueryProvider constructor. |
||
28 | * |
||
29 | * @param \Drupal\Core\Cache\CacheBackendInterface $cacheBackend |
||
30 | * The cache backend for storing query map file paths. |
||
31 | * @param \Drupal\Core\Config\ConfigFactoryInterface $configFactory |
||
32 | * The config factory. |
||
33 | */ |
||
34 | public function __construct(CacheBackendInterface $cacheBackend, ConfigFactoryInterface $configFactory) { |
||
38 | |||
39 | /** |
||
40 | * {@inheritdoc} |
||
41 | */ |
||
42 | public function getQuery($id, OperationParams $operation) { |
||
63 | |||
64 | /** |
||
65 | * Discovers the available query maps within the configured lookup paths. |
||
66 | * |
||
67 | * @return array |
||
68 | * An associative array of query maps with the query map versions as keys. |
||
69 | */ |
||
70 | protected function discoverQueryMaps() { |
||
92 | } |
||
93 |