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


PHP ilFileInputGUI::setAllowDeletion方法代码示例

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


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

示例1: initNewAccountMailForm

 protected function initNewAccountMailForm()
 {
     global $lng, $ilCtrl;
     $lng->loadLanguageModule("meta");
     $lng->loadLanguageModule("mail");
     include_once "./Services/Form/classes/class.ilPropertyFormGUI.php";
     $form = new ilPropertyFormGUI();
     $form->setFormAction($ilCtrl->getFormAction($this));
     $form->setTitleIcon(ilUtil::getImagePath("icon_mail.png"));
     $form->setTitle($lng->txt("user_new_account_mail"));
     $form->setDescription($lng->txt("user_new_account_mail_desc"));
     $langs = $lng->getInstalledLanguages();
     foreach ($langs as $lang_key) {
         $amail = $this->object->_lookupNewAccountMail($lang_key);
         $title = $lng->txt("meta_l_" . $lang_key);
         if ($lang_key == $lng->getDefaultLanguage()) {
             $title .= " (" . $lng->txt("default") . ")";
         }
         $header = new ilFormSectionHeaderGUI();
         $header->setTitle($title);
         $form->addItem($header);
         $subj = new ilTextInputGUI($lng->txt("subject"), "subject_" . $lang_key);
         // $subj->setRequired(true);
         $subj->setValue($amail["subject"]);
         $form->addItem($subj);
         $salg = new ilTextInputGUI($lng->txt("mail_salutation_general"), "sal_g_" . $lang_key);
         // $salg->setRequired(true);
         $salg->setValue($amail["sal_g"]);
         $form->addItem($salg);
         $salf = new ilTextInputGUI($lng->txt("mail_salutation_female"), "sal_f_" . $lang_key);
         // $salf->setRequired(true);
         $salf->setValue($amail["sal_f"]);
         $form->addItem($salf);
         $salm = new ilTextInputGUI($lng->txt("mail_salutation_male"), "sal_m_" . $lang_key);
         // $salm->setRequired(true);
         $salm->setValue($amail["sal_m"]);
         $form->addItem($salm);
         $body = new ilTextAreaInputGUI($lng->txt("message_content"), "body_" . $lang_key);
         // $body->setRequired(true);
         $body->setValue($amail["body"]);
         $body->setRows(10);
         $body->setCols(100);
         $form->addItem($body);
         $att = new ilFileInputGUI($lng->txt("attachment"), "att_" . $lang_key);
         $att->setAllowDeletion(true);
         if ($amail["att_file"]) {
             $att->setValue($amail["att_file"]);
         }
         $form->addItem($att);
     }
     $form->addCommandButton("saveNewAccountMail", $lng->txt("save"));
     $form->addCommandButton("cancelNewAccountMail", $lng->txt("cancel"));
     return $form;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:54,代码来源:class.ilObjUserFolderGUI.php

示例2: getInputField

 /**
  * @param ilDataCollectionField $field
  *
  * @return ilCheckboxInputGUI|ilDateTimeInputGUI|ilFileInputGUI|ilTextInputGUI|NULL
  */
 static function getInputField(ilDataCollectionField $field)
 {
     global $lng;
     $type_id = $field->getDatatypeId();
     $title = $field->getTitle();
     $input = NULL;
     switch ($type_id) {
         case ilDataCollectionDatatype::INPUTFORMAT_TEXT:
             $input = new ilTextInputGUI($title, 'field_' . $field->getId());
             if ($field->getTextArea()) {
                 $input = new ilTextAreaInputGUI($title, 'field_' . $field->getId());
             }
             if ($field->getLength()) {
                 $input->setInfo($lng->txt("dcl_max_text_length") . ": " . $field->getLength());
                 if (!$field->getTextArea()) {
                     $input->setMaxLength($field->getLength());
                 }
             }
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_NUMBER:
             $input = new ilTextInputGUI($title, 'field_' . $field->getId());
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_BOOLEAN:
             $input = new ilDclCheckboxInputGUI($title, 'field_' . $field->getId());
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_DATETIME:
             $input = new ilDateTimeInputGUI($title, 'field_' . $field->getId());
             $input->setStartYear(date("Y") - 100);
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_FILE:
             $input = new ilFileInputGUI($title, 'field_' . $field->getId());
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_REFERENCE:
             if (!$field->isNRef()) {
                 $input = new ilSelectInputGUI($title, 'field_' . $field->getId());
             } else {
                 $input = new ilMultiSelectInputGUI($title, 'field_' . $field->getId());
             }
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_RATING:
             $input = new ilTextInputGUI($title, 'field_' . $field->getId());
             $input->setValue($lng->txt("dcl_editable_in_table_gui"));
             $input->setDisabled(true);
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_ILIAS_REF:
             $input = new ilDataCollectionTreePickInputGUI($title, 'field_' . $field->getId());
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_MOB:
             $input = new ilFileInputGUI($title, 'field_' . $field->getId());
             $input->setSuffixes(self::$mob_suffixes);
             $input->setAllowDeletion(true);
             break;
         case ilDataCollectionDatatype::INPUTFORMAT_FORMULA:
             $input = new ilNonEditableValueGUI($title, 'field_' . $field->getId());
             $input->setValue('-');
             break;
     }
     if ($field->getDescription() && $input !== NULL) {
         $input->setInfo($field->getDescription() . ($input->getInfo() ? "<br>" . $input->getInfo() : ""));
     }
     return $input;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:67,代码来源:class.ilDataCollectionDatatype.php


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