src/Sulu/Bundle/PageBundle/Serializer/Subscriber/ShadowLocaleSubscriber.php
public function onPostSerialize(ObjectEvent $event)
    {
        $document = $event->getObject();

        if (!$document instanceof ShadowLocaleBehavior || !$this->documentRegistry->hasDocument($document)) {
            return;
        }

        $visitor = $event->getVisitor();

        $visitor->addData('shadowLocales', $this->documentInspector->getShadowLocales($document));
    }
public function onPostSerialize(ObjectEvent $event)
    {
        $document = $event->getObject();

        if (!$document instanceof ShadowLocaleBehavior || !$this->documentRegistry->hasDocument($document)) {
            return;
        }

        $visitor = $event->getVisitor();

        $visitor->addData('shadowLocales', $this->documentInspector->getShadowLocales($document));
    }
public function onPostSerialize ( ObjectEvent $ event ) { $ document = $ event -> getObject ( ) ; if ( ! $ document instanceof ShadowLocaleBehavior || ! $ this -> documentRegistry -> hasDocument ( $ document ) ) { return ; } $ visitor = $ event -> getVisitor ( ) ; $ visitor -> addData ( 'shadowLocales' , $ this -> documentInspector -> getShadowLocales ( $ document ) ) ; }
Adds the enabled shadow languages to the serialization.

@param ObjectEvent $event
Adds the enabled shadow languages to the serialization .