Skip to content
Snippets Groups Projects
Commit 2649d20f authored by Florian Azizian's avatar Florian Azizian
Browse files

FEAT #12070 TIME 0:10 return action categories

parent 9e3f5eae
No related branches found
No related tags found
No related merge requests found
...@@ -123,9 +123,11 @@ class IndexingController ...@@ -123,9 +123,11 @@ class IndexingController
$actions = []; $actions = [];
foreach ($indexingParameters['indexingParameters']['actions'] as $value) { foreach ($indexingParameters['indexingParameters']['actions'] as $value) {
$action = ActionModel::getById(['id' => $value, 'select' => ['id', 'label_action', 'component', 'id_status']]); $action = ActionModel::getById(['id' => $value, 'select' => ['id', 'label_action', 'component', 'id_status']]);
$categoriesList = ActionModel::getCategoriesById(['id' => $value]);
$action['enabled'] = !empty($action['id_status']) && $action['id_status'] != '_NOSTATUS_'; $action['enabled'] = !empty($action['id_status']) && $action['id_status'] != '_NOSTATUS_';
$action['categories'] = array_column($categoriesList, 'category_id');
$actions[] = $action; $actions[] = $action;
} }
...@@ -163,8 +165,8 @@ class IndexingController ...@@ -163,8 +165,8 @@ class IndexingController
$allowedEntities = array_unique($allowedEntities); $allowedEntities = array_unique($allowedEntities);
$entitiesTmp = EntityModel::get([ $entitiesTmp = EntityModel::get([
'select' => ['id', 'entity_label', 'entity_id'], 'select' => ['id', 'entity_label', 'entity_id'],
'where' => ['enabled = ?', '(parent_entity_id is null OR parent_entity_id = \'\')'], 'where' => ['enabled = ?', '(parent_entity_id is null OR parent_entity_id = \'\')'],
'data' => ['Y'], 'data' => ['Y'],
'orderBy' => ['entity_label'] 'orderBy' => ['entity_label']
]); ]);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment