Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Converter.php
Go to the documentation of this file.
1 <?php
9 
11 {
19  public function convert($source)
20  {
21  $output = [];
23  $resources = $source->getElementsByTagName('resource');
25  foreach ($resources as $resourceConfig) {
26  $resourceName = $resourceConfig->attributes->getNamedItem('name')->nodeValue;
27  $resourceData = [];
28  foreach ($resourceConfig->attributes as $attribute) {
29  $resourceData[$attribute->nodeName] = $attribute->nodeValue;
30  }
31  $output[$resourceName] = $resourceData;
32  }
33  return $output;
34  }
35 }
$source
Definition: source.php:23