本文整理汇总了PHP中ilSelectInputGUI::setParent方法的典型用法代码示例。如果您正苦于以下问题:PHP ilSelectInputGUI::setParent方法的具体用法?PHP ilSelectInputGUI::setParent怎么用?PHP ilSelectInputGUI::setParent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilSelectInputGUI
的用法示例。
在下文中一共展示了ilSelectInputGUI::setParent方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: initFilter
/**
* Init filter
*/
function initFilter()
{
global $lng;
// most filters are only
if (!ilObjLanguageAccess::_isPageTranslation()) {
// pattern
include_once "./Services/Form/classes/class.ilTextInputGUI.php";
$ti = new ilTextInputGUI($lng->txt("search"), "pattern");
$ti->setParent($this->parent_obj);
$ti->setMaxLength(64);
$ti->setSize(20);
$this->addFilterItem($ti);
$ti->readFromSession();
// module
$options = array();
$options["all"] = $lng->txt("language_all_modules");
$modules = ilObjLanguageExt::_getModules($lng->getLangKey());
foreach ($modules as $mod) {
$options[$mod] = $mod;
}
include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
$si = new ilSelectInputGUI(ucfirst($lng->txt("module")), "module");
$si->setParent($this->parent_obj);
$si->setOptions($options);
$this->addFilterItem($si);
$si->readFromSession();
if (!$si->getValue()) {
$si->setValue('administration');
}
// mode
$options = array();
$options["all"] = $lng->txt("language_scope_global");
$options["changed"] = $lng->txt("language_scope_local");
if ($this->params['langmode']) {
$options["added"] = $lng->txt("language_scope_added");
}
$options["unchanged"] = $lng->txt("language_scope_unchanged");
$options["equal"] = $lng->txt("language_scope_equal");
$options["different"] = $lng->txt("language_scope_different");
$options["commented"] = $lng->txt("language_scope_commented");
if ($this->params['langmode']) {
$options["dbremarks"] = $lng->txt("language_scope_dbremarks");
}
$options["conflicts"] = $lng->txt("language_scope_conflicts");
include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
$si = new ilSelectInputGUI($lng->txt("filter"), "mode");
$si->setParent($this->parent_obj);
$si->setOptions($options);
$this->addFilterItem($si);
$si->readFromSession();
if (!$si->getValue()) {
$si->setValue('all');
}
}
//compare
$options = array();
$langlist = $lng->getInstalledLanguages();
foreach ($langlist as $lang_key) {
$options[$lang_key] = $lng->txt("meta_l_" . $lang_key);
}
include_once "./Services/Form/classes/class.ilSelectInputGUI.php";
$si = new ilSelectInputGUI($lng->txt("language_compare"), "compare");
$si->setParent($this->parent_obj);
$si->setOptions($options);
$this->addFilterItem($si);
$si->readFromSession();
if (!$si->getValue()) {
$si->setValue($lng->getDefaultLanguage());
}
}