src/Sulu/Bundle/DocumentManagerBundle/Bridge/DocumentInspector.php
public function getShadowLocales(ShadowLocaleBehavior $document)
    {
        $shadowLocales = [];
        $locales = $this->getLocales($document);
        $node = $this->getNode($document);
        foreach ($locales as $locale) {
            $shadowEnabledName = $this->encoder->localizedSystemName(
                ShadowLocaleSubscriber::SHADOW_ENABLED_FIELD,
                $locale
            );
            $shadowLocaleName = $this->encoder->localizedSystemName(
                ShadowLocaleSubscriber::SHADOW_LOCALE_FIELD,
                $locale
            );

            if ($node->getPropertyValueWithDefault($shadowEnabledName, false)) {
                $shadowLocales[$locale] = $node->getPropertyValue($shadowLocaleName);
            }
        }

        return $shadowLocales;
    }
public function getShadowLocales(ShadowLocaleBehavior $document)
    {
        $shadowLocales = [];
        $locales = $this->getLocales($document);
        $node = $this->getNode($document);
        foreach ($locales as $locale) {
            $shadowEnabledName = $this->encoder->localizedSystemName(
                ShadowLocaleSubscriber::SHADOW_ENABLED_FIELD,
                $locale
            );
            $shadowLocaleName = $this->encoder->localizedSystemName(
                ShadowLocaleSubscriber::SHADOW_LOCALE_FIELD,
                $locale
            );

            if ($node->getPropertyValueWithDefault($shadowEnabledName, false)) {
                $shadowLocales[$locale] = $node->getPropertyValue($shadowLocaleName);
            }
        }

        return $shadowLocales;
    }
public function getShadowLocales ( ShadowLocaleBehavior $ document ) { $ shadowLocales = [ ] ; $ locales = $ this -> getLocales ( $ document ) ; $ node = $ this -> getNode ( $ document ) ; foreach ( $ locales as $ locale ) { $ shadowEnabledName = $ this -> encoder -> localizedSystemName ( ShadowLocaleSubscriber :: SHADOW_ENABLED_FIELD , $ locale ) ; $ shadowLocaleName = $ this -> encoder -> localizedSystemName ( ShadowLocaleSubscriber :: SHADOW_LOCALE_FIELD , $ locale ) ; if ( $ node -> getPropertyValueWithDefault ( $ shadowEnabledName , false ) ) { $ shadowLocales [ $ locale ] = $ node -> getPropertyValue ( $ shadowLocaleName ) ; } } return $ shadowLocales ; }
Return the enabled shadow locales for the given document.

@param ShadowLocaleBehavior $document

@return array
Return the enabled shadow locales for the given document .