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

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

Upgrades the node to new URL representation.
private upgradeNode ( PHPCR\NodeInterface $node, string $locale, array $properties, boolean $addScheme )
$node PHPCR\NodeInterface The node to be upgraded
$locale string The locale of the node to be upgraded
$properties array The properties which are or contain URL fields
$addScheme boolean Adds the scheme to URLs if true, removes the scheme otherwise
    private function upgradeNode(NodeInterface $node, $locale, $properties, $addScheme)
    {
        /** @var BasePageDocument $document */
        $document = $this->documentManager->find($node->getIdentifier(), $locale);
        $documentLocales = $this->documentInspector->getLocales($document);
        if (!in_array($locale, $documentLocales)) {
            return;
        }
        foreach ($properties as $property) {
            $this->upgradeProperty($document->getStructure()->getProperty($property), $addScheme);
        }
        $this->documentManager->persist($document, $locale);
    }