src/Sulu/Bundle/PageBundle/Command/WebspaceCopyCommand.php
protected function updateBlocksStructure(
        array &$structureArray,
        BlockMetadata $property,
        $localeSource,
        $localeDestination
    ) {
        if (!array_key_exists($property->getName(), $structureArray) || !$structureArray[$property->getName()]) {
            return;
        }

        foreach ($structureArray[$property->getName()] as &$structure) {
            /** @var ItemMetadata $component */
            $component = $property->getComponentByName($structure['type']);
            /** @var PropertyMetadata $child */
            foreach ($component->getChildren() as $child) {
                if ($structure[$child->getName()]) {
                    $this->processContentType(
                        $child,
                        $structure,
                        $localeSource,
                        $localeDestination
                    );
                }
            }
        }
    }
protected function updateBlocksStructure(
        array &$structureArray,
        BlockMetadata $property,
        $localeSource,
        $localeDestination
    ) {
        if (!array_key_exists($property->getName(), $structureArray) || !$structureArray[$property->getName()]) {
            return;
        }

        foreach ($structureArray[$property->getName()] as &$structure) {
            /** @var ItemMetadata $component */
            $component = $property->getComponentByName($structure['type']);
            /** @var PropertyMetadata $child */
            foreach ($component->getChildren() as $child) {
                if ($structure[$child->getName()]) {
                    $this->processContentType(
                        $child,
                        $structure,
                        $localeSource,
                        $localeDestination
                    );
                }
            }
        }
    }
protected function updateBlocksStructure ( array & $ structureArray , BlockMetadata $ property , $ localeSource , $ localeDestination ) { if ( ! array_key_exists ( $ property -> getName ( ) , $ structureArray ) || ! $ structureArray [ $ property -> getName ( ) ] ) { return ; } foreach ( $ structureArray [ $ property -> getName ( ) ] as & $ structure ) { /** @var ItemMetadata $component */ $ component = $ property -> getComponentByName ( $ structure [ 'type' ] ) ; /** @var PropertyMetadata $child */ foreach ( $ component -> getChildren ( ) as $ child ) { if ( $ structure [ $ child -> getName ( ) ] ) { $ this -> processContentType ( $ child , $ structure , $ localeSource , $ localeDestination ) ; } } } }
Process content type block.

@param array $structureArray
@param BlockMetadata $property
@param string $localeSource
@param string $localeDestination
Process content type block .