當前位置: 首頁>>代碼示例>>PHP>>正文


PHP ilTextInputGUI::setParent方法代碼示例

本文整理匯總了PHP中ilTextInputGUI::setParent方法的典型用法代碼示例。如果您正苦於以下問題:PHP ilTextInputGUI::setParent方法的具體用法?PHP ilTextInputGUI::setParent怎麽用?PHP ilTextInputGUI::setParent使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在ilTextInputGUI的用法示例。


在下文中一共展示了ilTextInputGUI::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


注:本文中的ilTextInputGUI::setParent方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。