src/Sulu/Bundle/DocumentManagerBundle/Bridge/DocumentInspector.php
public function getLocalizationState($document)
    {
        if ($document instanceof ShadowLocaleBehavior) {
            if (true === $document->isShadowLocaleEnabled()) {
                return LocalizationState::SHADOW;
            }
        }

        $originalLocale = $document->getOriginalLocale();
        $currentLocale = $document->getLocale();

        if ($originalLocale === $currentLocale) {
            return LocalizationState::LOCALIZED;
        }

        return LocalizationState::GHOST;
    }
public function getLocalizationState($document)
    {
        if ($document instanceof ShadowLocaleBehavior) {
            if (true === $document->isShadowLocaleEnabled()) {
                return LocalizationState::SHADOW;
            }
        }

        $originalLocale = $document->getOriginalLocale();
        $currentLocale = $document->getLocale();

        if ($originalLocale === $currentLocale) {
            return LocalizationState::LOCALIZED;
        }

        return LocalizationState::GHOST;
    }
public function getLocalizationState ( $ document ) { if ( $ document instanceof ShadowLocaleBehavior ) { if ( true === $ document -> isShadowLocaleEnabled ( ) ) { return LocalizationState :: SHADOW ; } } $ originalLocale = $ document -> getOriginalLocale ( ) ; $ currentLocale = $ document -> getLocale ( ) ; if ( $ originalLocale === $ currentLocale ) { return LocalizationState :: LOCALIZED ; } return LocalizationState :: GHOST ; }
Return the localization state of the node.

@param object $document

@return string
Return the localization state of the node .