Made property-group elements optional in TDFs

This commit is contained in:
Nav
2024-10-12 16:04:55 +01:00
parent 8b5f626e4f
commit 22cca07242

View File

@@ -159,10 +159,12 @@ class XmlService
$deviceElement->setAttribute($attrName, $attrValue);
}
if (!empty($tdf->propertyGroups)) {
$propertyGroupsElement = $document->createElement('property-groups');
foreach ($tdf->propertyGroups as $propertyGroup) {
$propertyGroupsElement->append($this->toXmlService->propertyGroupToXml($propertyGroup, $document));
}
}
$deviceElement->append($propertyGroupsElement);