src/Sulu/Bundle/PageBundle/Resources/phpcr-migrations/Version201511240844.php
private function iterateStructures($addScheme)
    {
        $properties = [];

        // find templates containing URL fields
        $structureMetadatas = array_merge(
            $this->structureMetadataFactory->getStructures('page'),
            $this->structureMetadataFactory->getStructures('snippet')
        );

        $structureMetadatas = array_filter(
            $structureMetadatas,
            function(StructureMetadata $structureMetadata) use (&$properties) {
                $structureName = $structureMetadata->getName();
                $this->findUrlProperties($structureMetadata, $properties);

                return !empty($properties[$structureName]) || !empty($blockProperties[$structureName]);
            }
        );

        foreach ($structureMetadatas as $structureMetadata) {
            $this->iterateStructureNodes(
                $structureMetadata,
                $properties[$structureMetadata->getName()],
                $addScheme
            );
        }

        $this->documentManager->flush();
    }
private function iterateStructures($addScheme)
    {
        $properties = [];

        // find templates containing URL fields
        $structureMetadatas = array_merge(
            $this->structureMetadataFactory->getStructures('page'),
            $this->structureMetadataFactory->getStructures('snippet')
        );

        $structureMetadatas = array_filter(
            $structureMetadatas,
            function(StructureMetadata $structureMetadata) use (&$properties) {
                $structureName = $structureMetadata->getName();
                $this->findUrlProperties($structureMetadata, $properties);

                return !empty($properties[$structureName]) || !empty($blockProperties[$structureName]);
            }
        );

        foreach ($structureMetadatas as $structureMetadata) {
            $this->iterateStructureNodes(
                $structureMetadata,
                $properties[$structureMetadata->getName()],
                $addScheme
            );
        }

        $this->documentManager->flush();
    }
private function iterateStructures ( $ addScheme ) { $ properties = [ ] ; // find templates containing URL fields $ structureMetadatas = array_merge ( $ this -> structureMetadataFactory -> getStructures ( 'page' ) , $ this -> structureMetadataFactory -> getStructures ( 'snippet' ) ) ; $ structureMetadatas = array_filter ( $ structureMetadatas , function ( StructureMetadata $ structureMetadata ) use ( & $ properties ) { $ structureName = $ structureMetadata -> getName ( ) ; $ this -> findUrlProperties ( $ structureMetadata , $ properties ) ; return ! empty ( $ properties [ $ structureName ] ) || ! empty ( $ blockProperties [ $ structureName ] ) ; } ) ; foreach ( $ structureMetadatas as $ structureMetadata ) { $ this -> iterateStructureNodes ( $ structureMetadata , $ properties [ $ structureMetadata -> getName ( ) ] , $ addScheme ) ; } $ this -> documentManager -> flush ( ) ; }
Structures are updated according to their xml definition.

@param bool $addScheme Adds the scheme to URLs if true, removes the scheme otherwise
Structures are updated according to their xml definition .