Skip to content
Snippets Groups Projects
Verified Commit c08106a5 authored by Damien's avatar Damien
Browse files

FEAT #15253 TIME 0:10 Add path to parent entities

parent 5f65b80c
No related branches found
No related tags found
No related merge requests found
...@@ -182,6 +182,7 @@ class MergeController ...@@ -182,6 +182,7 @@ class MergeController
$initiator['path'] = EntityModel::getEntityPathByEntityId(['entityId' => $resource['initiator'], 'path' => '']); $initiator['path'] = EntityModel::getEntityPathByEntityId(['entityId' => $resource['initiator'], 'path' => '']);
if (!empty($initiator['parent_entity_id'])) { if (!empty($initiator['parent_entity_id'])) {
$parentInitiator = EntityModel::getByEntityId(['entityId' => $initiator['parent_entity_id'], 'select' => ['*']]); $parentInitiator = EntityModel::getByEntityId(['entityId' => $initiator['parent_entity_id'], 'select' => ['*']]);
$parentInitiator['path'] = EntityModel::getEntityPathByEntityId(['entityId' => $initiator['parent_entity_id'], 'path' => '']);
} }
} }
if (!empty($resource['destination'])) { if (!empty($resource['destination'])) {
...@@ -189,6 +190,7 @@ class MergeController ...@@ -189,6 +190,7 @@ class MergeController
$destination['path'] = EntityModel::getEntityPathByEntityId(['entityId' => $resource['destination'], 'path' => '']); $destination['path'] = EntityModel::getEntityPathByEntityId(['entityId' => $resource['destination'], 'path' => '']);
if (!empty($destination['parent_entity_id'])) { if (!empty($destination['parent_entity_id'])) {
$parentDestination = EntityModel::getByEntityId(['entityId' => $destination['parent_entity_id'], 'select' => ['*']]); $parentDestination = EntityModel::getByEntityId(['entityId' => $destination['parent_entity_id'], 'select' => ['*']]);
$parentDestination['path'] = EntityModel::getEntityPathByEntityId(['entityId' => $destination['parent_entity_id'], 'path' => '']);
} }
} }
......
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