From cebc147b747b8c082f695d9ac55feb2488256632 Mon Sep 17 00:00:00 2001 From: Damien <damien.burel@maarch.org> Date: Tue, 27 Aug 2019 18:11:14 +0200 Subject: [PATCH] FEAT entities id --- src/app/entity/models/EntityModelAbstract.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/entity/models/EntityModelAbstract.php b/src/app/entity/models/EntityModelAbstract.php index 5f97319c334..5cd68ed1a1e 100755 --- a/src/app/entity/models/EntityModelAbstract.php +++ b/src/app/entity/models/EntityModelAbstract.php @@ -330,9 +330,10 @@ abstract class EntityModelAbstract $entitiesAllowed = EntityModel::getAllEntitiesByUserId(['userId' => $aArgs['userId']]); } - $allEntities = EntityModel::get(['select' => ['entity_id', 'entity_label', 'parent_entity_id'], 'where' => ['enabled = ?'], 'data' => ['Y'], 'orderBy' => ['parent_entity_id']]); + $allEntities = EntityModel::get(['select' => ['id', 'entity_id', 'entity_label', 'parent_entity_id'], 'where' => ['enabled = ?'], 'data' => ['Y'], 'orderBy' => ['parent_entity_id']]); foreach ($allEntities as $key => $value) { + $allEntities[$key]['serialId'] = $value['id']; $allEntities[$key]['id'] = $value['entity_id']; if (empty($value['parent_entity_id'])) { $allEntities[$key]['parent'] = '#'; -- GitLab