src/Sulu/Component/Content/Document/Subscriber/ShadowCopyPropertiesSubscriber.php
public function copyToShadows($document, NodeInterface $node)
    {
        $tags = $this->getTags($node, $document->getLocale());
        $categories = $this->getCategories($node, $document->getLocale());
        $navigationContext = $this->getNavigationContext($node, $document->getLocale());

        foreach ($node->getProperties(self::SHADOW_BASE_PROPERTY) as $property) {
            if ($property->getValue() === $document->getLocale()) {
                $locale = $this->getLocale($property->getName());

                $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);
            }
        }
    }
public function copyToShadows($document, NodeInterface $node)
    {
        $tags = $this->getTags($node, $document->getLocale());
        $categories = $this->getCategories($node, $document->getLocale());
        $navigationContext = $this->getNavigationContext($node, $document->getLocale());

        foreach ($node->getProperties(self::SHADOW_BASE_PROPERTY) as $property) {
            if ($property->getValue() === $document->getLocale()) {
                $locale = $this->getLocale($property->getName());

                $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);
            }
        }
    }
public function copyToShadows ( $ document , NodeInterface $ node ) { $ tags = $ this -> getTags ( $ node , $ document -> getLocale ( ) ) ; $ categories = $ this -> getCategories ( $ node , $ document -> getLocale ( ) ) ; $ navigationContext = $ this -> getNavigationContext ( $ node , $ document -> getLocale ( ) ) ; foreach ( $ node -> getProperties ( self :: SHADOW_BASE_PROPERTY ) as $ property ) { if ( $ property -> getValue ( ) === $ document -> getLocale ( ) ) { $ locale = $ this -> getLocale ( $ property -> getName ( ) ) ; $ 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 ) ; } } }
Copy tags and categories from current locale to all shadowed pages with this locale as base-locale.

@param object $document
@param NodeInterface $node
Copy tags and categories from current locale to all shadowed pages with this locale as base - locale .