/** * Sets visibility of the $node according to the $nodeXml * * @param \SimpleXMLElement $nodeXml * @param NodeInterface $node * @return void */ protected function importNodeVisibility(\SimpleXMLElement $nodeXml, NodeInterface $node) { $node->setHidden((bool) $nodeXml['hidden']); $node->setHiddenInIndex((bool) $nodeXml['hiddenInIndex']); if ((string) $nodeXml['hiddenBeforeDateTime'] !== '') { $node->setHiddenBeforeDateTime(\DateTime::createFromFormat(\DateTime::W3C, (string) $nodeXml['hiddenBeforeDateTime'])); } if ((string) $nodeXml['hiddenAfterDateTime'] !== '') { $node->setHiddenAfterDateTime(\DateTime::createFromFormat(\DateTime::W3C, (string) $nodeXml['hiddenAfterDateTime'])); } }