Skip to content

Commit b89b75e

Browse files
committed
MAGETWO-52958: Better Semantic for UI Components
1 parent 99c7694 commit b89b75e

File tree

3 files changed

+20
-6
lines changed

3 files changed

+20
-6
lines changed

app/code/Magento/Ui/Config/Converter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,6 @@ private function convertChildNodes(\DOMNode $node)
270270
}
271271
}
272272

273-
return array($arguments, $childResult);
273+
return [$arguments, $childResult];
274274
}
275275
}

app/code/Magento/Ui/Config/Reader/DefinitionMap/Converter.php

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,7 @@ private function toArray(\DOMNode $node)
8787
} else {
8888
list($arguments, $childResult) = $this->convertChildNodes($node);
8989

90-
if (!empty($arguments)) {
91-
$result[static::ARGUMENT_KEY] = $arguments;
92-
}
93-
90+
$result += $this->processArguments($arguments);
9491
$result += $childResult;
9592
}
9693
break;
@@ -190,6 +187,22 @@ private function convertChildNodes(\DOMNode $node)
190187
}
191188
}
192189

193-
return array($arguments, $childResult);
190+
return [$arguments, $childResult];
191+
}
192+
193+
/**
194+
* Process component arguments
195+
*
196+
* @param array $arguments
197+
* @return array
198+
*/
199+
private function processArguments(array $arguments)
200+
{
201+
$result = [];
202+
if (!empty($arguments)) {
203+
$result[static::ARGUMENT_KEY] = $arguments;
204+
}
205+
206+
return $result;
194207
}
195208
}

lib/internal/Magento/Framework/View/Element/UiComponentFactory.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,7 @@ public function __construct(
8989
DataInterface $definitionData = null
9090
) {
9191
$this->objectManager = $objectManager;
92+
$this->componentManager = $componentManager;
9293
$this->argumentInterpreter = $argumentInterpreter;
9394
$this->contextFactory = $contextFactory;
9495
$this->componentChildFactories = $componentChildFactories;

0 commit comments

Comments
 (0)