$menu[] =
$this->
parseEntry($entry);
} } return $menu;
} private function parseEntry(DOMElement
$entry): array
{ $menuEntry =
[];
$menuEntry['isRootMenu'
] = self::
validateBooleanAttribute($entry->
getAttribute('isRootMenu'
));
$label = self::
parseTranslatableElement($entry, 'label'
);
if ($label !== null
) { $menuEntry['label'
] =
$label;
} foreach (['name', 'controller', 'action', 'class', 'onclick'
] as $simpleField) { $fieldValue = self::
getElementChildValueByName($entry,
$simpleField);
if ($fieldValue !== null
) { $menuEntry[$simpleField] =
$fieldValue;
}