Skip to content

Commit

Permalink
add routing methods, code style
Browse files Browse the repository at this point in the history
  • Loading branch information
benwalch committed Dec 10, 2024
1 parent c07321b commit 33f7c40
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 1 deletion.
5 changes: 5 additions & 0 deletions config/pimcore/routing.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,27 @@
dynamic_search.controller.admin.get_state:
path: /admin/dynamic-search/settings/health-state
methods: [ GET ]
defaults: { _controller: DynamicSearchBundle\Controller\Admin\SettingsController::healthStateAction }
options:
expose: true

dynamic_search.controller.admin.get_provider:
path: /admin/dynamic-search/settings/provider
methods: [ GET ]
defaults: { _controller: DynamicSearchBundle\Controller\Admin\SettingsController::providerAction }
options:
expose: true

dynamic_search.controller.admin.get_context_full_configuration:
path: /admin/dynamic-search/settings/context-full-configuration
methods: [ GET ]
defaults: { _controller: DynamicSearchBundle\Controller\Admin\SettingsController::contextFullConfigurationAction }
options:
expose: true

dynamic_search.controller.admin.index_queue.get_info:
path: /admin/dynamic-search/settings/index-queue/info
methods: [ GET ]
defaults: { _controller: DynamicSearchBundle\Controller\Admin\SettingsController::indexQueueInfoAction }
options:
expose: true
Expand All @@ -38,4 +42,5 @@ dynamic_search.controller.admin.index_queue.clear:

dynamic_search.controller.json_search:
path: /dynamic-search/{contextName}/j-{outputChannelName}
methods: [ GET ]
defaults: { _controller: DynamicSearchBundle\Controller\SearchController::jsonSearchAction }
4 changes: 3 additions & 1 deletion config/pimcore/routing/frontend_routing.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
dynamic_search_frontend_search_list:
path: /dynamic-search/{contextName}/{outputChannelName}
methods: [ GET ]
defaults: { _controller: DynamicSearchBundle\Controller\SearchFrontendController::searchAction }

dynamic_search_frontend_multi_search_list:
path: /dynamic-search/{contextName}/collection/{outputChannelName}
defaults: { _controller: DynamicSearchBundle\Controller\SearchFrontendController::multiSearchAction }
methods: [ GET ]
defaults: { _controller: DynamicSearchBundle\Controller\SearchFrontendController::multiSearchAction }
1 change: 1 addition & 0 deletions src/Controller/Admin/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public function indexQueueAllDataAction(Request $request, ContextRunnerInterface
public function clearIndexQueueAction(QueueManagerInterface $queueManager): Response
{
$queueManager->clearQueue();

return new Response();
}

Expand Down
1 change: 1 addition & 0 deletions src/Manager/QueueManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ public function getTotalQueuedItems(): int
{
$qb = $this->connection->createQueryBuilder();
$qb->select('COUNT(id)')->from($this->tableName);

return (int)$qb->executeQuery()->fetchOne();
}

Expand Down

0 comments on commit 33f7c40

Please sign in to comment.