src/Graviton/I18nBundle/Translator/Translator.php
public function getLanguages()
    {
        if (!empty($this->languages)) {
            return $this->languages;
        }

        $this->languages = array_map(
            function ($record) {
                return $record['_id'];
            },
            $this->languageCollection->find([], ['_id' => 1])->toArray()
        );

        asort($this->languages);

        $this->languages = array_values($this->languages);

        return $this->languages;
    }
public function getLanguages()
    {
        if (!empty($this->languages)) {
            return $this->languages;
        }

        $this->languages = array_map(
            function ($record) {
                return $record['_id'];
            },
            $this->languageCollection->find([], ['_id' => 1])->toArray()
        );

        asort($this->languages);

        $this->languages = array_values($this->languages);

        return $this->languages;
    }
public function getLanguages ( ) { if ( ! empty ( $ this -> languages ) ) { return $ this -> languages ; } $ this -> languages = array_map ( function ( $ record ) { return $ record [ '_id' ] ; } , $ this -> languageCollection -> find ( [ ] , [ '_id' => 1 ] ) -> toArray ( ) ) ; asort ( $ this -> languages ) ; $ this -> languages = array_values ( $ this -> languages ) ; return $ this -> languages ; }
returns all available languages

@return array languages
returns all available languages