src/Sulu/Bundle/DocumentManagerBundle/Bridge/DocumentInspector.php
public function getPublishedLocales(ShadowLocaleBehavior $document)
    {
        $node = $this->getNode($document);
        $locales = $this->getLocales($document);
        $publishedLocales = [];

        foreach ($locales as $locale) {
            $publishedPropertyName = $this->encoder->localizedSystemName(
                WorkflowStageSubscriber::PUBLISHED_FIELD,
                $locale
            );

            if ($node->getPropertyValueWithDefault($publishedPropertyName, false)) {
                $publishedLocales[] = $locale;
            }
        }

        return $publishedLocales;
    }
public function getPublishedLocales(ShadowLocaleBehavior $document)
    {
        $node = $this->getNode($document);
        $locales = $this->getLocales($document);
        $publishedLocales = [];

        foreach ($locales as $locale) {
            $publishedPropertyName = $this->encoder->localizedSystemName(
                WorkflowStageSubscriber::PUBLISHED_FIELD,
                $locale
            );

            if ($node->getPropertyValueWithDefault($publishedPropertyName, false)) {
                $publishedLocales[] = $locale;
            }
        }

        return $publishedLocales;
    }
public function getPublishedLocales ( ShadowLocaleBehavior $ document ) { $ node = $ this -> getNode ( $ document ) ; $ locales = $ this -> getLocales ( $ document ) ; $ publishedLocales = [ ] ; foreach ( $ locales as $ locale ) { $ publishedPropertyName = $ this -> encoder -> localizedSystemName ( WorkflowStageSubscriber :: PUBLISHED_FIELD , $ locale ) ; if ( $ node -> getPropertyValueWithDefault ( $ publishedPropertyName , false ) ) { $ publishedLocales [ ] = $ locale ; } } return $ publishedLocales ; }
Return the published locales for the given document.

@param ShadowLocaleBehavior $document

@return array
Return the published locales for the given document .