Replaced group attribute with name attribute in Signal TDF element

This commit is contained in:
Nav
2024-09-15 15:27:08 +01:00
parent 179d7180a2
commit e522261991
266 changed files with 29437 additions and 29436 deletions

View File

@@ -371,10 +371,10 @@ class FromXmlService
$attributes = $this->getNodeAttributesByName($element);
return new Signal(
$attributes['name'] ?? null,
$attributes['pad-key'] ?? null,
$this->stringService->tryStringToInt($attributes['index'] ?? null),
$attributes['function'] ?? null,
$attributes['group'] ?? null,
$attributes['field'] ?? null
);
}

View File

@@ -186,6 +186,7 @@ class ToXmlService
public function signalToXml(Signal $signal, DOMDocument $document): DOMElement
{
$element = $document->createElement('signal');
$element->setAttribute('name', $signal->name);
$element->setAttribute('pad-key', $signal->padKey);
if ($signal->index !== null) {
@@ -196,10 +197,6 @@ class ToXmlService
$element->setAttribute('function', $signal->function);
}
if ($signal->group !== null) {
$element->setAttribute('group', $signal->group);
}
if ($signal->field !== null) {
$element->setAttribute('field', $signal->field);
}