getAvailableLanguages() public method

Returns the list of all available languages, including the ones configured in related SiteAccesses.
public getAvailableLanguages ( ) : array
return array
Esempio n. 1
0
 /**
  * Returns the list of available languages.
  *
  * @return array
  */
 public function getAvailableLanguages()
 {
     return $this->translationHelper->getAvailableLanguages();
 }
 public function testGetAvailableLanguagesWithoutTranslationSiteAccesses()
 {
     $this->configResolver->expects($this->any())->method('getParameter')->will($this->returnValueMap(array(array('translation_siteaccesses', null, null, array()), array('related_siteaccesses', null, null, array('fre', 'esl', 'heb')), array('languages', null, null, array('eng-GB')), array('languages', null, 'fre', array('fre-FR', 'eng-GB')), array('languages', null, 'esl', array('esl-ES', 'fre-FR', 'eng-GB')), array('languages', null, 'heb', array('heb-IL', 'eng-GB')))));
     $expectedLanguages = array('eng-GB', 'esl-ES', 'fre-FR', 'heb-IL');
     $this->assertSame($expectedLanguages, $this->translationHelper->getAvailableLanguages());
 }