private function loadProperties($templateKey, $path, &$tags, \DOMXPath $xpath, \DOMNode $context = null)
{
$result = [];
/** @var \DOMElement $node */
foreach ($xpath->query($path, $context) as $node) {
if ($node->tagName === 'property') {
$value = $this->loadProperty($templateKey, $xpath, $node, $tags);
$result[$value['name']] = $value;
} elseif ($node->tagName === 'block') {
$value = $this->loadBlock($templateKey, $xpath, $node, $tags);
$result[$value['name']] = $value;
} elseif ($node->tagName === 'section') {
$value = $this->loadSection($templateKey, $xpath, $node, $tags);
$result[$value['name']] = $value;
}
}
return $result;
}