src/Sulu/Bundle/PageBundle/Resources/phpcr-migrations/Version201511240843.php
private function iterateStructureNodes(StructureMetadata $structureMetadata, array $properties, $up)
    {
        foreach ($this->localizationManager->getLocalizations() as $localization) {
            $rows = $this->session->getWorkspace()->getQueryManager()->createQuery(
                sprintf(
                    'SELECT * FROM [nt:unstructured] WHERE [%s] = "%s" OR [%s] = "%s"',
                    $this->propertyEncoder->localizedSystemName('template', $localization->getLocale()),
                    $structureMetadata->getName(),
                    'template',
                    $structureMetadata->getName()
                ),
                'JCR-SQL2'
            )->execute();

            foreach ($rows->getNodes() as $node) {
                $this->upgradeNode($node, $localization->getLocale(), $properties, $up);
            }
        }
    }
private function iterateStructureNodes(StructureMetadata $structureMetadata, array $properties, $up)
    {
        foreach ($this->localizationManager->getLocalizations() as $localization) {
            $rows = $this->session->getWorkspace()->getQueryManager()->createQuery(
                sprintf(
                    'SELECT * FROM [nt:unstructured] WHERE [%s] = "%s" OR [%s] = "%s"',
                    $this->propertyEncoder->localizedSystemName('template', $localization->getLocale()),
                    $structureMetadata->getName(),
                    'template',
                    $structureMetadata->getName()
                ),
                'JCR-SQL2'
            )->execute();

            foreach ($rows->getNodes() as $node) {
                $this->upgradeNode($node, $localization->getLocale(), $properties, $up);
            }
        }
    }
private function iterateStructureNodes ( StructureMetadata $ structureMetadata , array $ properties , $ up ) { foreach ( $ this -> localizationManager -> getLocalizations ( ) as $ localization ) { $ rows = $ this -> session -> getWorkspace ( ) -> getQueryManager ( ) -> createQuery ( sprintf ( 'SELECT * FROM [nt:unstructured] WHERE [%s] = "%s" OR [%s] = "%s"' , $ this -> propertyEncoder -> localizedSystemName ( 'template' , $ localization -> getLocale ( ) ) , $ structureMetadata -> getName ( ) , 'template' , $ structureMetadata -> getName ( ) ) , 'JCR-SQL2' ) -> execute ( ) ; foreach ( $ rows -> getNodes ( ) as $ node ) { $ this -> upgradeNode ( $ node , $ localization -> getLocale ( ) , $ properties , $ up ) ; } } }
Iterates over all nodes of the given type, and upgrades them.

@param StructureMetadata $structureMetadata The structure metadata, whose pages have to be upgraded
@param array $properties The properties which are or contain date fields
@param bool $up
Iterates over all nodes of the given type and upgrades them .