public function indexAction() { /** @var \DOMElement $configNode */ $configNode = $this->root->appendChild($this->xml->createElement('CatalogConfig')); $conf = \Difra\Config::getInstance(); $configNode->setAttribute('maxdepth', $conf->getValue('catalog', 'maxdepth')); $configNode->setAttribute('perpage', $conf->getValue('catalog', 'perpage')); $configNode->setAttribute('hideempty', $conf->getValue('catalog', 'hideempty')); $configNode->setAttribute('allownoimage', $conf->getValue('catalog', 'allownoimage')); $configNode->setAttribute('usescale', $conf->getValue('catalog', 'usescale')); $imgSizes = \Difra\Plugins\Catalog\Item::getSizes(); $imgSizes2 = []; foreach ($imgSizes as $k => $arr) { if ($k == 'f') { continue; } $imgSizes2[] = $k . ' ' . implode(' ', $arr); } $configNode->setAttribute('imgSizes', implode("\n", $imgSizes2)); }