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

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

Upgrades the given property to the new URL representation.
private upgradeProperty ( PropertyValue $property, boolean $addScheme )
$property Sulu\Component\Content\Document\Structure\PropertyValue The current property value, which will be updated
$addScheme boolean Adds the scheme to URLs if true, removes the scheme otherwise
    private function upgradeProperty(PropertyValue $property, $addScheme)
    {
        $value = $property->getValue();
        if (is_array($value)) {
            foreach ($value as $key => $entry) {
                if ($entry['type'] !== 'url') {
                    continue;
                }
                if ($addScheme) {
                    $this->upgradeUrl($entry['url']);
                } else {
                    $this->downgradeUrl($entry['url']);
                }
                $value[$key] = $entry;
            }
        } elseif ($addScheme) {
            $this->upgradeUrl($value);
        } else {
            $this->downgradeUrl($value);
        }
        $property->setValue($value);
    }