src/Sulu/Bundle/PageBundle/Document/Subscriber/PublishSubscriber.php
private function removeLocalizedNodeProperties(NodeInterface $node, $locale)
    {
        // remove all localized system properties from the node
        foreach ($node->getProperties($this->propertyEncoder->localizedSystemName('', $locale) . '*') as $property) {
            $property->remove();
        }

        // remove all localized content properties from the node
        foreach ($node->getProperties($this->propertyEncoder->localizedContentName('', $locale) . '*') as $property) {
            $property->remove();
        }
    }
private function removeLocalizedNodeProperties(NodeInterface $node, $locale)
    {
        // remove all localized system properties from the node
        foreach ($node->getProperties($this->propertyEncoder->localizedSystemName('', $locale) . '*') as $property) {
            $property->remove();
        }

        // remove all localized content properties from the node
        foreach ($node->getProperties($this->propertyEncoder->localizedContentName('', $locale) . '*') as $property) {
            $property->remove();
        }
    }
private function removeLocalizedNodeProperties ( NodeInterface $ node , $ locale ) { // remove all localized system properties from the node foreach ( $ node -> getProperties ( $ this -> propertyEncoder -> localizedSystemName ( '' , $ locale ) . '*' ) as $ property ) { $ property -> remove ( ) ; } // remove all localized content properties from the node foreach ( $ node -> getProperties ( $ this -> propertyEncoder -> localizedContentName ( '' , $ locale ) . '*' ) as $ property ) { $ property -> remove ( ) ; } }
Removes all localized properties in the given locale from the given node.

@param NodeInterface $node
@param string $locale
Removes all localized properties in the given locale from the given node .