src/Sulu/Bundle/PageBundle/Resources/phpcr-migrations/Version201511240843.php
private function upgradeProperty(PropertyMetadata $property, NodeInterface $node, $locale, $up)
    {
        $name = sprintf('i18n:%s-%s', $locale, $property->getName());
        if (!$node->hasProperty($name)) {
            return;
        }

        $value = $node->getPropertyValue($name);

        if ($up) {
            $value = $this->upgradeDate($value);
        } else {
            $value = $this->downgradeDate($value);
        }

        $node->setProperty($name, $value);
    }
private function upgradeProperty(PropertyMetadata $property, NodeInterface $node, $locale, $up)
    {
        $name = sprintf('i18n:%s-%s', $locale, $property->getName());
        if (!$node->hasProperty($name)) {
            return;
        }

        $value = $node->getPropertyValue($name);

        if ($up) {
            $value = $this->upgradeDate($value);
        } else {
            $value = $this->downgradeDate($value);
        }

        $node->setProperty($name, $value);
    }
private function upgradeProperty ( PropertyMetadata $ property , NodeInterface $ node , $ locale , $ up ) { $ name = sprintf ( 'i18n:%s-%s' , $ locale , $ property -> getName ( ) ) ; if ( ! $ node -> hasProperty ( $ name ) ) { return ; } $ value = $ node -> getPropertyValue ( $ name ) ; if ( $ up ) { $ value = $ this -> upgradeDate ( $ value ) ; } else { $ value = $ this -> downgradeDate ( $ value ) ; } $ node -> setProperty ( $ name , $ value ) ; }
Upgrades the given property to the new date representation.

@param PropertyMetadata $property
@param NodeInterface $node
@param bool $up
Upgrades the given property to the new date representation .