Replaced group attribute with name attribute in Signal TDF element
This commit is contained in:
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user