/** * Parse all descriptive of an acl * * @param SimpleXMLElement $acl The acl node */ protected function parseDescriptives(SimpleXMLElement $acl) { /** @var SimpleXMLElement $descriptive */ foreach ($acl->children() as $descriptive) { $aclI18n = AclQuery::create()->findOneByCode($acl->getAttributeAsPHP("code")); $aclI18n->setLocale($descriptive->getAttributeAsPhp('locale')); if ($title = $descriptive->getArgumentsAsPhp('title')) { $aclI18n->setTitle($title[0]); } if ($description = $descriptive->getArgumentsAsPhp('description')) { $aclI18n->setDescription($description[0]); } $aclI18n->save(); } }