当前位置: 首页>>代码示例>>PHP>>正文


PHP ilSelectInputGUI::setParent方法代码示例

本文整理汇总了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());
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:73,代码来源:class.ilLanguageExtTableGUI.php


注:本文中的ilSelectInputGUI::setParent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。