1 | <?php |
||
23 | class QueryController |
||
24 | { |
||
25 | /** @var \eZ\Publish\API\Repository\SearchService */ |
||
26 | private $searchService; |
||
27 | |||
28 | /** @var \eZ\Publish\Core\QueryType\ContentViewQueryTypeMapper */ |
||
29 | private $contentViewQueryTypeMapper; |
||
30 | |||
31 | public function __construct( |
||
38 | |||
39 | /** |
||
40 | * Runs a content search. |
||
41 | * |
||
42 | * @param ContentView $view |
||
43 | * @return ContentView |
||
44 | */ |
||
45 | public function contentQueryAction(ContentView $view) |
||
51 | |||
52 | /** |
||
53 | * Runs a location search. |
||
54 | * |
||
55 | * @param ContentView $view |
||
56 | * @return ContentView |
||
57 | */ |
||
58 | public function locationQueryAction(ContentView $view) |
||
64 | |||
65 | /** |
||
66 | * Runs a contentInfo search. |
||
67 | * |
||
68 | * @param ContentView $view |
||
69 | * @return ContentView |
||
70 | */ |
||
71 | public function contentInfoQueryAction(ContentView $view) |
||
77 | |||
78 | /** |
||
79 | * Runs the Query defined in $view using $method on SearchService. |
||
80 | * |
||
81 | * @param ContentView $view |
||
82 | * @param string $method Name of the SearchService method to run. |
||
83 | */ |
||
84 | private function runQuery(ContentView $view, $method) |
||
91 | |||
92 | /** |
||
93 | * @param \eZ\Publish\Core\MVC\Symfony\View\ContentView $view |
||
94 | * @param \Symfony\Component\HttpFoundation\Request $request |
||
95 | * @return \eZ\Publish\Core\MVC\Symfony\View\ContentView |
||
96 | */ |
||
97 | public function pagingQueryAction(ContentView $view, Request $request) |
||
103 | |||
104 | /** |
||
105 | * @param \eZ\Publish\Core\MVC\Symfony\View\ContentView $view |
||
106 | * @param \Symfony\Component\HttpFoundation\Request $request |
||
107 | */ |
||
108 | private function runPagingQuery(ContentView $view, Request $request) |
||
126 | |||
127 | /** |
||
128 | * @param \eZ\Publish\API\Repository\Values\Content\Query $query |
||
129 | * @return \Pagerfanta\Adapter\AdapterInterface |
||
130 | */ |
||
131 | private function getAdapter(Query $query): AdapterInterface |
||
139 | } |
||
140 |