Made key and name attributes optional in register-group-instance TDF elements
Also removed the attribute from all instances of the element, where it wasn't necessary.
This commit is contained in:
@@ -162,8 +162,14 @@ class ToXmlService
|
||||
DOMDocument $document
|
||||
): DOMElement {
|
||||
$element = $document->createElement('register-group-instance');
|
||||
$element->setAttribute('key', $registerGroupInstance->key);
|
||||
$element->setAttribute('name', $registerGroupInstance->name);
|
||||
|
||||
if (!empty($registerGroupInstance->key)) {
|
||||
$element->setAttribute('key', $registerGroupInstance->key);
|
||||
}
|
||||
|
||||
if (!empty($registerGroupInstance->name)) {
|
||||
$element->setAttribute('name', $registerGroupInstance->name);
|
||||
}
|
||||
|
||||
if (!empty($registerGroupInstance->description)) {
|
||||
$element->setAttribute('description', $registerGroupInstance->description);
|
||||
|
||||
Reference in New Issue
Block a user