Neos\ContentRepository\Domain\Service\ImportExport\NodeImportService::parseEndElement PHP Method

parseEndElement() protected method

Parses the closing tags writes data to the database then
protected parseEndElement ( XMLReader $reader ) : void
$reader XMLReader
return void
    protected function parseEndElement(\XMLReader $reader)
    {
        switch ($reader->name) {
            case 'hiddenBeforeDateTime':
            case 'hiddenAfterDateTime':
            case 'creationDateTime':
            case 'lastModificationDateTime':
            case 'lastPublicationDateTime':
            case 'accessRoles':
                break;
            case 'node':
                // update current path
                array_pop($this->nodeNameStack);
                // update current node identifier
                array_pop($this->nodeIdentifierStack);
                break;
            case 'variant':
                // we have collected all data for the node so we save it
                $nodeData = array_pop($this->nodeDataStack);
                // if XML files lack the identifier for a node, add it here
                if (!isset($nodeData['identifier'])) {
                    $nodeData['identifier'] = Algorithms::generateUUID();
                }
                $this->persistNodeData($nodeData);
                break;
            default:
                throw new ImportException(sprintf('Unexpected end element <%s> ', $reader->name), 1423578066);
                break;
        }
    }