本文整理汇总了PHP中ilLanguage::lookupId方法的典型用法代码示例。如果您正苦于以下问题:PHP ilLanguage::lookupId方法的具体用法?PHP ilLanguage::lookupId怎么用?PHP ilLanguage::lookupId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilLanguage
的用法示例。
在下文中一共展示了ilLanguage::lookupId方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parse
/**
* Parse input data
*/
public function parse()
{
$installed = $this->lng->getInstalledLanguages();
$tbl_data = array();
$counter = 0;
foreach ($installed as $key => $langkey) {
$tbl_data[$counter]['key'] = $langkey;
$tbl_data[$counter]['id'] = ilLanguage::lookupId($langkey);
$tbl_data[$counter]['status'] = ilAuthLoginPageEditorSettings::getInstance()->isIliasEditorEnabled($langkey);
++$counter;
}
$this->setData($tbl_data);
}
示例2: getLoginPageEditorHTML
/**
* Get HTML of ILIAS login page editor
* @return string html
*/
protected function getLoginPageEditorHTML()
{
global $lng, $tpl;
include_once './Services/Authentication/classes/class.ilAuthLoginPageEditorSettings.php';
$lpe = ilAuthLoginPageEditorSettings::getInstance();
$active_lang = $lpe->getIliasEditorLanguage($lng->getLangKey());
if (!$active_lang) {
return '';
}
// if page does not exist, return nothing
include_once './Services/COPage/classes/class.ilPageUtil.php';
if (!ilPageUtil::_existsAndNotEmpty('auth', ilLanguage::lookupId($active_lang))) {
return '';
}
include_once './Services/Authentication/classes/class.ilLoginPage.php';
include_once './Services/Authentication/classes/class.ilLoginPageGUI.php';
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
$tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
$tpl->setCurrentBlock("SyntaxStyle");
$tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
$tpl->parseCurrentBlock();
// get page object
$page_gui = new ilLoginPageGUI(ilLanguage::lookupId($active_lang));
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
$page_gui->setStyleId(0, 'auth');
$page_gui->setPresentationTitle("");
$page_gui->setTemplateOutput(false);
$page_gui->setHeader("");
$ret = $page_gui->showPage();
return $ret;
}
示例3: getLoginPageEditorHTML
/**
* Get HTML of ILIAS login page editor
* @return string html
*/
protected function getLoginPageEditorHTML()
{
global $lng, $tpl;
include_once './Services/Authentication/classes/class.ilAuthLoginPageEditorSettings.php';
$lpe = ilAuthLoginPageEditorSettings::getInstance();
$active_lang = $lpe->getIliasEditorLanguage($lng->getLangKey());
if (!$active_lang) {
return '';
}
// if page does not exist, return nothing
include_once './Services/COPage/classes/class.ilPageUtil.php';
if (!ilPageUtil::_existsAndNotEmpty('auth', ilLanguage::lookupId($active_lang))) {
return '';
}
include_once './Services/COPage/classes/class.ilPageObject.php';
include_once './Services/COPage/classes/class.ilPageObjectGUI.php';
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
$tpl->setVariable("LOCATION_CONTENT_STYLESHEET", ilObjStyleSheet::getContentStylePath(0));
$tpl->setCurrentBlock("SyntaxStyle");
$tpl->setVariable("LOCATION_SYNTAX_STYLESHEET", ilObjStyleSheet::getSyntaxStylePath());
$tpl->parseCurrentBlock();
// get page object
$page_gui = new ilPageObjectGUI('auth', ilLanguage::lookupId($active_lang));
/*
include_once("./Services/Style/classes/class.ilObjStyleSheet.php");
$page_gui->setStyleId(ilObjStyleSheet::getEffectiveContentStyleId(
$this->object->getStyleSheetId(), $this->object->getType()));
*/
include_once "./Services/Style/classes/class.ilObjStyleSheet.php";
$page_gui->setStyleId(0, 'auth');
$page_gui->setIntLinkHelpDefault("RepositoryItem", $active_lang);
//$page_gui->setFileDownloadLink($this->ctrl->getLinkTarget($this, "downloadFile"));
//$page_gui->setFullscreenLink($this->ctrl->getLinkTarget($this, "showMediaFullscreen"));
//$page_gui->setLinkParams($this->ctrl->getUrlParameterString()); // todo
// $page_gui->setSourcecodeDownloadScript($this->ctrl->getLinkTarget($this, ""));
$page_gui->setPresentationTitle("");
$page_gui->setTemplateOutput(false);
$page_gui->setHeader("");
$page_gui->setEnabledRepositoryObjects(true);
$page_gui->setEnabledLoginPage(true);
$page_gui->setEnabledFileLists(false);
$page_gui->setEnabledPCTabs(false);
$page_gui->setEnabledMaps(true);
$ret = $page_gui->showPage();
return $ret;
}