Skip to content

Commit 15243db

Browse files
committed
Allow to autodetermine categories and pathes from info provider import using a full path
This fixes issue #1113
1 parent e1090d4 commit 15243db

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/Repository/StructuralDBElementRepository.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,14 @@ public function findForInfoProvider(string $name): ?AbstractStructuralDBElement
243243
return $result[0];
244244
}
245245

246+
//If the name contains category delimiters like ->, try to find the element by its full path
247+
if (str_contains($name, '->')) {
248+
$tmp = $this->getEntityByPath($name, '->');
249+
if (count($tmp) > 0) {
250+
return $tmp[count($tmp) - 1];
251+
}
252+
}
253+
246254
//If we find nothing, return null
247255
return null;
248256
}

0 commit comments

Comments
 (0)