Allow to autodetermine categories and pathes from info provider import using a full path

This fixes issue #1113
This commit is contained in:
Jan Böhmer 2025-12-07 20:39:03 +01:00
parent e1090d46e3
commit 15243dbcc8

View file

@ -243,6 +243,14 @@ class StructuralDBElementRepository extends AttachmentContainingDBElementReposit
return $result[0];
}
//If the name contains category delimiters like ->, try to find the element by its full path
if (str_contains($name, '->')) {
$tmp = $this->getEntityByPath($name, '->');
if (count($tmp) > 0) {
return $tmp[count($tmp) - 1];
}
}
//If we find nothing, return null
return null;
}