src/Sulu/Bundle/PageBundle/Resources/phpcr-migrations/Version201507231648.php
private function upgradeNode(NodeInterface $node, $propertyName, $locale)
    {
        foreach ($node->getNodes() as $child) {
            $this->upgradeNode($child, $propertyName, $locale);
        }

        if (false === $node->getPropertyValueWithDefault($propertyName, false)) {
            return;
        }

        $shadowLocale = $node->getPropertyValue($this->getPropertyName(self::SHADOW_BASE_PROPERTY, $locale));

        $tags = $this->getTags($node, $shadowLocale);
        $categories = $this->getCategories($node, $shadowLocale);
        $navigationContext = $this->getNavigationContext($node, $shadowLocale);

        $node->setProperty(sprintf(self::TAGS_PROPERTY, $locale), $tags);
        $node->setProperty(sprintf(self::CATEGORIES_PROPERTY, $locale), $categories);
        $node->setProperty(sprintf(self::NAVIGATION_CONTEXT_PROPERTY, $locale), $navigationContext);
    }
private function upgradeNode(NodeInterface $node, $propertyName, $locale)
    {
        foreach ($node->getNodes() as $child) {
            $this->upgradeNode($child, $propertyName, $locale);
        }

        if (false === $node->getPropertyValueWithDefault($propertyName, false)) {
            return;
        }

        $shadowLocale = $node->getPropertyValue($this->getPropertyName(self::SHADOW_BASE_PROPERTY, $locale));

        $tags = $this->getTags($node, $shadowLocale);
        $categories = $this->getCategories($node, $shadowLocale);
        $navigationContext = $this->getNavigationContext($node, $shadowLocale);

        $node->setProperty(sprintf(self::TAGS_PROPERTY, $locale), $tags);
        $node->setProperty(sprintf(self::CATEGORIES_PROPERTY, $locale), $categories);
        $node->setProperty(sprintf(self::NAVIGATION_CONTEXT_PROPERTY, $locale), $navigationContext);
    }
private function upgradeNode ( NodeInterface $ node , $ propertyName , $ locale ) { foreach ( $ node -> getNodes ( ) as $ child ) { $ this -> upgradeNode ( $ child , $ propertyName , $ locale ) ; } if ( false === $ node -> getPropertyValueWithDefault ( $ propertyName , false ) ) { return ; } $ shadowLocale = $ node -> getPropertyValue ( $ this -> getPropertyName ( self :: SHADOW_BASE_PROPERTY , $ locale ) ) ; $ tags = $ this -> getTags ( $ node , $ shadowLocale ) ; $ categories = $ this -> getCategories ( $ node , $ shadowLocale ) ; $ navigationContext = $ this -> getNavigationContext ( $ node , $ shadowLocale ) ; $ node -> setProperty ( sprintf ( self :: TAGS_PROPERTY , $ locale ) , $ tags ) ; $ node -> setProperty ( sprintf ( self :: CATEGORIES_PROPERTY , $ locale ) , $ categories ) ; $ node -> setProperty ( sprintf ( self :: NAVIGATION_CONTEXT_PROPERTY , $ locale ) , $ navigationContext ) ; }
Upgrade a single node.

@param NodeInterface $node
@param string $propertyName
@param string $locale
Upgrade a single node .