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


PHP ilFormSectionHeaderGUI::setInfo方法代码示例

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


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

示例1: addToForm

 public function addToForm()
 {
     if ($this->getTitle()) {
         $section = new ilFormSectionHeaderGUI();
         $section->setTitle($this->getTitle());
         if ($this->getInfo()) {
             $section->setInfo($this->getInfo());
         }
         $this->getForm()->addItem($section);
     }
     $this->prepareElements();
     foreach ($this->elements as $element) {
         $element->addToForm();
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:15,代码来源:class.ilADTGroupFormBridge.php

示例2: parseSearch

 /**
  * Parse search 
  */
 private function parseSearch()
 {
     // this is NOT used for the global search, see ilLuceneAdvancedSearchFields::getFormElement()
     // (so searchable flag is NOT relevant)
     //
     // current usage: wiki page element "[amd] page list"
     $this->lng->loadLanguageModule('search');
     include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
     include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php';
     if ($this->getSelectedOnly()) {
         $recs = ilAdvancedMDRecord::_getSelectedRecordsByObject($this->obj_type, $this->obj_id, $this->sub_type);
     } else {
         $recs = ilAdvancedMDRecord::_getActivatedRecordsByObjectType($this->obj_type, $this->sub_type);
     }
     $this->search_form = array();
     foreach ($recs as $record) {
         $section = new ilFormSectionHeaderGUI();
         $section->setTitle($record->getTitle());
         $section->setInfo($record->getDescription());
         $this->form->addItem($section);
         foreach (ilAdvancedMDFieldDefinition::getInstancesByRecordId($record->getRecordId(), true) as $field) {
             $field_form = ilADTFactory::getInstance()->getSearchBridgeForDefinitionInstance($field->getADTDefinition(), true, false);
             $field_form->setForm($this->form);
             $field_form->setElementId("advmd[" . $field->getFieldId() . "]");
             $field_form->setTitle($field->getTitle());
             if (is_array($this->search_form_values) && isset($this->search_form_values[$field->getFieldId()])) {
                 $field->setSearchValueSerialized($field_form, $this->search_form_values[$field->getFieldId()]);
             }
             $field->prepareElementForSearch($field_form);
             $field_form->addToForm();
             $this->search_form[$field->getFieldId()] = array("def" => $field, "value" => $field_form);
         }
     }
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:37,代码来源:class.ilAdvancedMDRecordGUI.php

示例3: parseEditor

 /**
  * Parse property form in editor mode
  *
  * @access private
  * 
  */
 private function parseEditor()
 {
     global $ilUser;
     include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDRecord.php';
     foreach (ilAdvancedMDRecord::_getActivatedRecordsByObjectType($this->obj_type) as $record_obj) {
         $section = new ilFormSectionHeaderGUI();
         $section->setTitle($record_obj->getTitle());
         $section->setInfo($record_obj->getDescription());
         $this->form->addItem($section);
         include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDFieldDefinition.php';
         foreach (ilAdvancedMDFieldDefinition::_getDefinitionsByRecordId($record_obj->getRecordId()) as $def) {
             if ($this->handleECSDefinitions($def)) {
                 continue;
             }
             include_once 'Services/AdvancedMetaData/classes/class.ilAdvancedMDValue.php';
             $value = ilAdvancedMDValue::_getInstance($this->obj_id, $def->getFieldId());
             switch ($def->getFieldType()) {
                 case ilAdvancedMDFieldDefinition::TYPE_TEXT:
                     $text = new ilTextInputGUI($def->getTitle(), 'md[' . $def->getFieldId() . ']');
                     $text->setValue($value->getValue());
                     $text->setSize(40);
                     $text->setMaxLength(512);
                     $text->setDisabled($value->isDisabled());
                     $text->setInfo($def->getDescription());
                     $this->form->addItem($text);
                     break;
                 case ilAdvancedMDFieldDefinition::TYPE_SELECT:
                     $select = new ilSelectInputGUI($def->getTitle(), 'md[' . $def->getFieldId() . ']');
                     $select->setOptions($def->getFieldValuesForSelect());
                     $select->setValue($value->getValue());
                     $select->setDisabled($value->isDisabled());
                     $select->setInfo($def->getDescription());
                     $this->form->addItem($select);
                     break;
                 case ilAdvancedMDFieldDefinition::TYPE_DATE:
                     $unixtime = $value->getValue() ? $value->getValue() : mktime(8, 0, 0, date('m'), date('d'), date('Y'));
                     $time = new ilDateTimeInputGUI($def->getTitle(), 'md[' . $def->getFieldId() . ']');
                     $time->setShowTime(false);
                     $time->setDate(new ilDate($unixtime, IL_CAL_UNIX));
                     $time->enableDateActivation($this->lng->txt('enabled'), 'md_activated[' . $def->getFieldId() . ']', $value->getValue() ? true : false);
                     $time->setDisabled($value->isDisabled());
                     $time->setInfo($def->getDescription());
                     $this->form->addItem($time);
                     break;
                 case ilAdvancedMDFieldDefinition::TYPE_DATETIME:
                     $unixtime = $value->getValue() ? $value->getValue() : mktime(8, 0, 0, date('m'), date('d'), date('Y'));
                     $time = new ilDateTimeInputGUI($def->getTitle(), 'md[' . $def->getFieldId() . ']');
                     $time->setShowTime(true);
                     $time->setDate(new ilDateTime($unixtime, IL_CAL_UNIX, $ilUser->getTimeZone()));
                     $time->enableDateActivation($this->lng->txt('enabled'), 'md_activated[' . $def->getFieldId() . ']', $value->getValue() ? true : false);
                     $time->setDisabled($value->isDisabled());
                     $this->form->addItem($time);
                     break;
             }
         }
     }
 }
开发者ID:khanhnnvn,项目名称:ilias_E-learning,代码行数:63,代码来源:class.ilAdvancedMDRecordGUI.php


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