Sulu\Bundle\ContentBundle\Version201507231648::upgradeNode PHP Метод

upgradeNode() приватный Метод

Upgrade a single node.
private upgradeNode ( PHPCR\NodeInterface $node, string $propertyName, string $locale )
$node PHPCR\NodeInterface
$propertyName string
$locale string
    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);
    }