本文整理汇总了PHP中LanguageManager::getEnabledAndDisabledLanguages方法的典型用法代码示例。如果您正苦于以下问题:PHP LanguageManager::getEnabledAndDisabledLanguages方法的具体用法?PHP LanguageManager::getEnabledAndDisabledLanguages怎么用?PHP LanguageManager::getEnabledAndDisabledLanguages使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LanguageManager
的用法示例。
在下文中一共展示了LanguageManager::getEnabledAndDisabledLanguages方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: display
/**
* @see SugarView::display()
*/
public function display()
{
global $mod_strings;
global $app_list_strings;
global $app_strings;
$languages = LanguageManager::getEnabledAndDisabledLanguages();
$this->ss->assign('APP', $GLOBALS['app_strings']);
$this->ss->assign('MOD', $GLOBALS['mod_strings']);
$this->ss->assign('enabled_langs', json_encode($languages['enabled']));
$this->ss->assign('disabled_langs', json_encode($languages['disabled']));
$this->ss->assign('title', $this->getModuleTitle(false));
echo $this->ss->fetch('modules/Administration/templates/Languages.tpl');
}
示例2: getAllLanguages
/**
* Gets all enabled and disabled languages. Wraps the util function to allow
* for manipulation of the return in the future.
*
* @return array Array of enabled and disabled languages
*/
public function getAllLanguages()
{
$languages = LanguageManager::getEnabledAndDisabledLanguages();
return array('enabled' => $this->getLanguageKeys($languages['enabled']), 'disabled' => $this->getLanguageKeys($languages['disabled']));
}