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


PHP ilRadioGroupInputGUI::setAlert方法代码示例

本文整理汇总了PHP中ilRadioGroupInputGUI::setAlert方法的典型用法代码示例。如果您正苦于以下问题:PHP ilRadioGroupInputGUI::setAlert方法的具体用法?PHP ilRadioGroupInputGUI::setAlert怎么用?PHP ilRadioGroupInputGUI::setAlert使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在ilRadioGroupInputGUI的用法示例。


在下文中一共展示了ilRadioGroupInputGUI::setAlert方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: displayCache

 public function displayCache()
 {
     require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
     require_once 'Services/GlobalCache/classes/class.ilGlobalCache.php';
     $this->checkDisplayMode('setup_cache');
     /**
      * @var $ini ilIniFile
      */
     $ini = $this->setup->getClient()->ini;
     $cache_form = new ilPropertyFormGUI();
     $cache_form->setTitle($this->lng->txt('global_cache_configuration'));
     $cache_form->addCommandButton('saveCache', $this->lng->txt('save'));
     $cache_form->setFormAction('setup.php?cmd=gateway');
     $activate_global_cache = 'activate_global_cache';
     $global_cache_service_type = 'global_cache_service_type';
     $activate_cache = new ilCheckboxInputGUI($this->lng->txt($activate_global_cache), $activate_global_cache);
     $activate_cache->setChecked($ini->readVariable('cache', $activate_global_cache));
     $service_type = new ilRadioGroupInputGUI($this->lng->txt($global_cache_service_type), $global_cache_service_type);
     $some_inactive = false;
     $message = '';
     foreach (ilGlobalCache::getAllTypes() as $type) {
         $option = new ilRadioOption($this->lng->txt($global_cache_service_type . '_' . $type->getServiceType()), $type->getServiceType());
         $option->setInfo($this->lng->txt('global_cache_install_info_' . $type->getServiceType()));
         if (!$type->isCacheServiceInstallable()) {
             $option->setDisabled(true);
             $message .= $this->lng->txt($global_cache_service_type . '_' . $type->getServiceType()) . ': ' . $type->getInstallationFailureReason() . '; ';
             $some_inactive = true;
         }
         $service_type->addOption($option);
     }
     if ($some_inactive) {
         $service_type->setAlert($message);
         ilUtil::sendInfo($this->lng->txt('global_cache_supported_services'));
     }
     $service_type->setValue($ini->readVariable('cache', $global_cache_service_type));
     $activate_cache->addSubItem($service_type);
     $cache_form->addItem($activate_cache);
     $this->tpl->setVariable('SETUP_CONTENT', $cache_form->getHTML());
 }
开发者ID:JKN-INC,项目名称:SHELBY-ILIAS,代码行数:39,代码来源:class.ilSetupGUI.php

示例2: initForm

 /**
  * init create/edit form
  *
  * @access protected
  * @param string edit or create
  * @return
  */
 protected function initForm($a_mode = 'edit')
 {
     global $ilUser, $tpl, $tree;
     if (is_object($this->form)) {
         return true;
     }
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $this->form = new ilPropertyFormGUI();
     switch ($a_mode) {
         case 'edit':
             $this->form->setFormAction($this->ctrl->getFormAction($this, 'update'));
             break;
         default:
             $this->form->setTableWidth('600px');
             $this->form->setFormAction($this->ctrl->getFormAction($this, 'save'));
             break;
     }
     // title
     $title = new ilTextInputGUI($this->lng->txt('title'), 'title');
     $title->setSubmitFormOnEnter(true);
     $title->setValue($this->object->getTitle());
     $title->setSize(40);
     $title->setMaxLength(128);
     $title->setRequired(true);
     $this->form->addItem($title);
     // desc
     $desc = new ilTextAreaInputGUI($this->lng->txt('description'), 'desc');
     $desc->setValue($this->object->getLongDescription());
     $desc->setRows(2);
     $desc->setCols(40);
     $this->form->addItem($desc);
     // Group type
     $grp_type = new ilRadioGroupInputGUI($this->lng->txt('grp_typ'), 'grp_type');
     if ($a_mode == 'edit') {
         $type = $this->object->getGroupType() ? $this->object->getGroupType() : $this->object->readGroupStatus();
     } else {
         $type = $this->object->getGroupType() ? $this->object->getGroupType() : GRP_TYPE_PUBLIC;
     }
     $grp_type->setValue($type);
     $grp_type->setRequired(true);
     // PUBLIC GROUP
     $opt_public = new ilRadioOption($this->lng->txt('grp_public'), GRP_TYPE_PUBLIC, $this->lng->txt('grp_public_info'));
     $grp_type->addOption($opt_public);
     // CLOSED GROUP
     $opt_closed = new ilRadioOption($this->lng->txt('grp_closed'), GRP_TYPE_CLOSED, $this->lng->txt('grp_closed_info'));
     $grp_type->addOption($opt_closed);
     if ($a_mode == 'update_group_type') {
         $grp_type->setAlert($this->lng->txt('grp_type_changed_info'));
     }
     $this->form->addItem($grp_type);
     if ($a_mode == 'edit') {
         // Group registration ############################################################
         $pres = new ilFormSectionHeaderGUI();
         $pres->setTitle($this->lng->txt('grp_setting_header_registration'));
         $this->form->addItem($pres);
         // Registration type
         $reg_type = new ilRadioGroupInputGUI($this->lng->txt('group_registration_mode'), 'registration_type');
         $reg_type->setValue($this->object->getRegistrationType());
         $opt_dir = new ilRadioOption($this->lng->txt('grp_reg_direct'), GRP_REGISTRATION_DIRECT);
         #$this->lng->txt('grp_reg_direct_info'));
         $reg_type->addOption($opt_dir);
         $opt_pass = new ilRadioOption($this->lng->txt('grp_pass_request'), GRP_REGISTRATION_PASSWORD);
         $pass = new ilTextInputGUI('', 'password');
         $pass->setInfo($this->lng->txt('grp_reg_password_info'));
         $pass->setValue($this->object->getPassword());
         $pass->setSize(10);
         $pass->setMaxLength(32);
         $opt_pass->addSubItem($pass);
         $reg_type->addOption($opt_pass);
         $opt_req = new ilRadioOption($this->lng->txt('grp_reg_request'), GRP_REGISTRATION_REQUEST, $this->lng->txt('grp_reg_request_info'));
         $reg_type->addOption($opt_req);
         $opt_deact = new ilRadioOption($this->lng->txt('grp_reg_disabled'), GRP_REGISTRATION_DEACTIVATED, $this->lng->txt('grp_reg_disabled_info'));
         $reg_type->addOption($opt_deact);
         // Registration codes
         $reg_code = new ilCheckboxInputGUI($this->lng->txt('grp_reg_code'), 'reg_code_enabled');
         $reg_code->setChecked($this->object->isRegistrationAccessCodeEnabled());
         $reg_code->setValue(1);
         $reg_code->setInfo($this->lng->txt('grp_reg_code_enabled_info'));
         $this->form->addItem($reg_type);
         // time limit
         $time_limit = new ilCheckboxInputGUI($this->lng->txt('grp_reg_limited'), 'reg_limit_time');
         $time_limit->setOptionTitle($this->lng->txt('grp_reg_limit_time'));
         $time_limit->setChecked($this->object->isRegistrationUnlimited() ? false : true);
         $this->lng->loadLanguageModule('dateplaner');
         include_once './Services/Form/classes/class.ilDateDurationInputGUI.php';
         $tpl->addJavaScript('./Services/Form/js/date_duration.js');
         $dur = new ilDateDurationInputGUI($this->lng->txt('grp_reg_period'), 'reg');
         $dur->setStartText($this->lng->txt('cal_start'));
         $dur->setEndText($this->lng->txt('cal_end'));
         $dur->setMinuteStepSize(5);
         $dur->setShowDate(true);
         $dur->setShowTime(true);
         $dur->setStart($this->object->getRegistrationStart());
//.........这里部分代码省略.........
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:101,代码来源:class.ilObjGroupGUI.php


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