本文整理汇总了PHP中ilTextAreaInputGUI::setAlert方法的典型用法代码示例。如果您正苦于以下问题:PHP ilTextAreaInputGUI::setAlert方法的具体用法?PHP ilTextAreaInputGUI::setAlert怎么用?PHP ilTextAreaInputGUI::setAlert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilTextAreaInputGUI
的用法示例。
在下文中一共展示了ilTextAreaInputGUI::setAlert方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initLoginForm
/**
* Init login form
*/
protected function initLoginForm()
{
global $rbacsystem, $lng, $ilSetting;
include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($this->ctrl->getFormAction($this, 'saveLoginInfo'));
$this->form->setTableWidth('80%');
$this->form->setTitle($this->lng->txt('login_information'));
$this->form->addCommandButton('saveLoginInfo', $this->lng->txt('save'));
include_once 'Services/LDAP/classes/class.ilLDAPServer.php';
include_once 'Services/Radius/classes/class.ilRadiusSettings.php';
$rad_settings = ilRadiusSettings::_getInstance();
if ($ldap_id = ilLDAPServer::_getFirstActiveServer() or $rad_settings->isActive()) {
$select = new ilSelectInputGUI($this->lng->txt('default_auth_mode'), 'default_auth_mode');
$select->setValue($ilSetting->get('default_auth_mode', AUTH_LOCAL));
$select->setInfo($this->lng->txt('default_auth_mode_info'));
$options[AUTH_LOCAL] = $this->lng->txt('auth_local');
if ($ldap_id) {
$options[AUTH_LDAP] = $this->lng->txt('auth_ldap');
}
if ($rad_settings->isActive()) {
$options[AUTH_RADIUS] = $this->lng->txt('auth_radius');
}
$select->setOptions($options);
$this->form->addItem($select);
}
if (!is_object($this->loginSettings)) {
$this->loginSettings = new ilSetting("login_settings");
}
$login_settings = $this->loginSettings->getAll();
$languages = $lng->getInstalledLanguages();
$def_language = $lng->getDefaultLanguage();
foreach ($this->setDefLangFirst($def_language, $languages) as $lang_key) {
$add = "";
if ($lang_key == $def_language) {
$add = " (" . $lng->txt("default") . ")";
}
$textarea = new ilTextAreaInputGUI($lng->txt("meta_l_" . $lang_key) . $add, 'login_message_' . $lang_key);
$textarea->setRows(10);
$textarea->setValue($login_settings["login_message_" . $lang_key]);
$textarea->setUseRte(true);
$textarea->setRteTagSet("extended");
$this->form->addItem($textarea);
unset($login_settings["login_message_" . $lang_key]);
}
foreach ($login_settings as $key => $message) {
$lang_key = substr($key, strrpos($key, "_") + 1, strlen($key) - strrpos($key, "_"));
$textarea = new ilTextAreaInputGUI($lng->txt("meta_l_" . $lang_key) . $add, 'login_message_' . $lang_key);
$textarea->setRows(10);
$textarea->setValue($message);
$textarea->setUseRte(true);
$textarea->setRteTagSet("extended");
if (!in_array($lang_key, $languages)) {
$textarea->setAlert($lng->txt("not_installed"));
}
$this->form->addItem($textarea);
}
}