src/Sulu/Bundle/DocumentManagerBundle/Bridge/DocumentInspector.php
public function getLocales($document)
    {
        $locales = [];
        $node = $this->getNode($document);
        $prefix = $this->namespaceRegistry->getPrefix('system_localized');

        foreach ($node->getProperties() as $property) {
            preg_match(
                sprintf('/^%s:([a-zA-Z_]*?)-.*/', $prefix),
                $property->getName(),
                $matches
            );

            if ($matches) {
                $locales[$matches[1]] = $matches[1];
            }
        }

        return array_values(array_unique($locales));
    }
public function getLocales($document)
    {
        $locales = [];
        $node = $this->getNode($document);
        $prefix = $this->namespaceRegistry->getPrefix('system_localized');

        foreach ($node->getProperties() as $property) {
            preg_match(
                sprintf('/^%s:([a-zA-Z_]*?)-.*/', $prefix),
                $property->getName(),
                $matches
            );

            if ($matches) {
                $locales[$matches[1]] = $matches[1];
            }
        }

        return array_values(array_unique($locales));
    }
public function getLocales ( $ document ) { $ locales = [ ] ; $ node = $ this -> getNode ( $ document ) ; $ prefix = $ this -> namespaceRegistry -> getPrefix ( 'system_localized' ) ; foreach ( $ node -> getProperties ( ) as $ property ) { preg_match ( sprintf ( '/^%s:([a-zA-Z_]*?)-.*/' , $ prefix ) , $ property -> getName ( ) , $ matches ) ; if ( $ matches ) { $ locales [ $ matches [ 1 ] ] = $ matches [ 1 ] ; } } return array_values ( array_unique ( $ locales ) ) ; }
Return the concrete localizations for the given document.

@param object $document

@return array
Return the concrete localizations for the given document .