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


PHP ilPropertyFormGUI::getInput方法代码示例

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


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

示例1: importEditFormValues

 protected function importEditFormValues(ilPropertyFormGUI $a_form)
 {
     $max = $a_form->getInput("maxchars");
     $this->object->setMaxChars(strlen($max) ? $max : null);
     $this->object->setTextWidth($a_form->getInput("textwidth"));
     $this->object->setTextHeight($a_form->getInput("textheight"));
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:7,代码来源:class.SurveyTextQuestionGUI.php

示例2: saveSpecificFormProperties

 /**
  * saves a given form object's specific form properties
  * relating to this question type
  * 
  * (overwrites the method from ilAssMultiOptionQuestionFeedback, because of individual setting)
  * 
  * @access public
  * @param ilPropertyFormGUI $form
  */
 public function saveSpecificFormProperties(ilPropertyFormGUI $form)
 {
     if (!$this->questionOBJ->isAdditionalContentEditingModePageObject()) {
         $this->saveSpecificFeedbackSetting($this->questionOBJ->getId(), $form->getInput('feedback_setting'));
         foreach ($this->getAnswerOptionsByAnswerIndex() as $index => $answer) {
             $this->saveSpecificAnswerFeedbackContent($this->questionOBJ->getId(), $index, $form->getInput("feedback_answer_{$index}"));
         }
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:18,代码来源:class.ilAssMultipleChoiceFeedback.php

示例3: afterSavePluginCreation

 /**
  * @param ilPropertyFormGUI $form
  * @param ilObjCloud        $obj
  */
 public function afterSavePluginCreation(ilObjCloud &$obj, ilPropertyFormGUI $form)
 {
     if ($form->getInput(self::F_BASE_FOLDER) == self::F_DEFAULT_BASE_FOLDER) {
         $root_folder = $obj->getTitle();
     } else {
         $root_folder = $form->getInput(self::F_CUSTOM_BASE_FOLDER_INPUT);
     }
     $root_folder = '/ILIASCloud/' . ltrim($root_folder, "/");
     $obj->setRootFolder($root_folder);
 }
开发者ID:pschmitt77,项目名称:OneDrive,代码行数:14,代码来源:class.ilOneDriveCreationGUI.php

示例4: afterSavePluginCreation

 /**
  * @param ilPropertyFormGUI $form
  * @param ilObjCloud $obj
  */
 function afterSavePluginCreation(ilObjCloud &$obj, ilPropertyFormGUI $form)
 {
     if ($form->getInput(self::F_BASE_FOLDER) == self::F_DROPBOX_DEFAULT_BASE_FOLDER) {
         $obj->setRootFolder($obj->getTitle());
     } else {
         $obj->setRootFolder($form->getInput(self::F_DROPBOX_CUSTOM_BASE_FOLDER_INPUT));
     }
     if ($form->getInput(self::F_ONLINE) == "1") {
         $obj->setOnline(true);
     }
     $obj->doUpdate();
 }
开发者ID:studer-raimann,项目名称:Dropbox,代码行数:16,代码来源:class.ilDropboxCreationGUI.php

示例5: checkInput

 /**
  * Check input of form
  *
  * @param $a_mode 'create' | 'update'
  *
  * @return bool
  */
 protected function checkInput($a_mode)
 {
     global $lng;
     $return = $this->form->checkInput();
     // Additional check for text fields: The length property should be max 200 if the textarea option is not set
     if ($this->form->getInput('datatype') == ilDataCollectionDatatype::INPUTFORMAT_TEXT && (int) $this->form->getInput('prop_' . ilDataCollectionField::PROPERTYID_LENGTH) > 200 && !$this->form->getInput('prop_' . ilDataCollectionField::PROPERTYID_TEXTAREA)) {
         $inputObj = $this->form->getItemByPostVar('prop_' . ilDataCollectionField::PROPERTYID_LENGTH);
         $inputObj->setAlert($lng->txt("form_msg_value_too_high"));
         $return = false;
     }
     // Don't allow multiple fields with the same title in this table
     if ($a_mode == 'create') {
         if ($title = $this->form->getInput('title')) {
             if (ilDataCollectionTable::_hasFieldByTitle($title, $this->table_id)) {
                 $inputObj = $this->form->getItemByPostVar('title');
                 $inputObj->setAlert($lng->txt("dcl_field_title_unique"));
                 $return = false;
             }
         }
     }
     if (!$return) {
         ilUtil::sendFailure($lng->txt("form_input_not_valid"));
     }
     return $return;
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:32,代码来源:class.ilDataCollectionFieldEditGUI.php

示例6: saveSettings

 /**
  *
  */
 protected function saveSettings()
 {
     /**
      * @var $rbacsystem ilRbacSystem
      * @var $ilErr      ilErrorHandling
      */
     global $rbacsystem, $ilErr;
     if (!$rbacsystem->checkAccess('write', $this->object->getRefId())) {
         $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
     }
     $provider = $this->factory->getByContext(ilTermsOfServiceTableDataProviderFactory::CONTEXT_AGRREMENT_BY_LANGUAGE);
     $list = $provider->getList(array(), array());
     $has_documents = false;
     foreach ($list['items'] as $item) {
         if ($item['agreement_document']) {
             $has_documents = true;
             break;
         }
     }
     $this->initSettingsForm();
     if ($this->form->checkInput()) {
         if ($has_documents || !(int) $this->form->getInput('tos_status')) {
             $this->object->saveStatus((int) $this->form->getInput('tos_status'));
             ilUtil::sendSuccess($this->lng->txt('saved_successfully'));
         }
     }
     if (!$has_documents && (int) $this->form->getInput('tos_status') && !$this->object->getStatus()) {
         $_POST['tos_status'] = 0;
         ilUtil::sendFailure($this->lng->txt('tos_no_documents_exist_cant_save'));
     }
     $this->settings(false);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:35,代码来源:class.ilObjTermsOfServiceGUI.php

示例7: uploadFiles

 /**
  * Update properties
  */
 public function uploadFiles()
 {
     $response = new stdClass();
     $response->error = null;
     $response->debug = null;
     $this->initUploadForm();
     if ($this->form->checkInput()) {
         try {
             $fileresult = $this->handleFileUpload($this->form->getInput("upload_files"));
             if ($fileresult) {
                 $response = (object) array_merge((array) $response, (array) $fileresult);
             }
         } catch (ilException $e) {
             $response->error = $e->getMessage();
         }
     } else {
         $error = new ilCloudException(ilCloudException::UPLOAD_FAILED);
         $response->error = $error->getMessage();
     }
     // send response object (don't use 'application/json' as IE wants to download it!)
     header('Vary: Accept');
     header('Content-type: text/plain');
     echo ilJsonUtil::encode($response);
     exit;
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:28,代码来源:class.ilCloudPluginUploadGUI.php

示例8: updateProperties

 public function updateProperties()
 {
     $this->initPropertiesForm();
     if ($this->form->checkInput()) {
         $this->object->setTitle($this->form->getInput('title'));
         $this->object->setDescription($this->form->getInput('desc'));
         $this->object->update();
         ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
         $this->ctrl->redirect($this, 'editProperties');
     }
     $this->form->setValuesByPost();
     $this->tpl->setContent($this->form->getHtml());
 }
开发者ID:studer-raimann,项目名称:Edupad,代码行数:13,代码来源:class.ilObjEdupadGUI.php

示例9: importEditFormValues

 protected function importEditFormValues(ilPropertyFormGUI $a_form)
 {
     $this->object->setOrientation($a_form->getInput("orientation"));
     $this->object->categories->flushCategories();
     foreach ($_POST['answers']['answer'] as $key => $value) {
         if (strlen($value)) {
             $this->object->getCategories()->addCategory($value, $_POST['answers']['other'][$key], 0, null, $_POST['answers']['scale'][$key]);
         }
     }
     if (strlen($_POST['answers']['neutral'])) {
         $this->object->getCategories()->addCategory($_POST['answers']['neutral'], 0, 1, null, $_POST['answers_neutral_scale']);
     }
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:13,代码来源:class.SurveySingleChoiceQuestionGUI.php

示例10: saveSettings

 /**
  *
  */
 protected function saveSettings()
 {
     /**
      * @var $rbacsystem ilRbacSystem
      * @var $ilErr      ilErrorHandling
      */
     global $rbacsystem, $ilErr;
     if (!$rbacsystem->checkAccess('write', $this->object->getRefId())) {
         $ilErr->raiseError($this->lng->txt('permission_denied'), $ilErr->MESSAGE);
     }
     $this->initSettingsForm();
     if ($this->form->checkInput()) {
         $this->object->saveStatus((int) $this->form->getInput('tos_status'));
         ilUtil::sendSuccess($this->lng->txt('saved_successfully'));
     }
     $this->settings(false);
 }
开发者ID:Walid-Synakene,项目名称:ilias,代码行数:20,代码来源:class.ilObjTermsOfServiceGUI.php

示例11: updateNotificationSettingsObject

 public function updateNotificationSettingsObject()
 {
     /**
      * @var $ilAccess ilAccessHandler
      * @var $ilErr		ilErr
      */
     global $ilAccess, $ilErr;
     if (!$ilAccess->checkAccess('write', '', $this->ref_id)) {
         $ilErr->raiseError($this->lng->txt('msg_no_perm_read'), $ilErr->MESSAGE);
     }
     // instantiate the property form
     $this->initNotificationSettingsForm();
     // check input
     if ($this->notificationSettingsForm->checkInput()) {
         if (isset($_POST['notification_type']) && $_POST['notification_type'] == 'all_users') {
             // set values and call update
             $this->objProperties->setAdminForceNoti(1);
             $this->objProperties->setUserToggleNoti((int) $this->notificationSettingsForm->getInput('usr_toggle'));
             $this->objProperties->setNotificationType('all_users');
             $this->updateUserNotifications(true);
         } else {
             if ($_POST['notification_type'] == 'per_user') {
                 $this->objProperties->setNotificationType('per_user');
                 $this->objProperties->setAdminForceNoti(1);
                 $this->objProperties->setUserToggleNoti(0);
                 $this->updateUserNotifications();
             } else {
                 $this->objProperties->setNotificationType('default');
                 $this->objProperties->setAdminForceNoti(0);
                 $this->objProperties->setUserToggleNoti(0);
                 include_once 'Modules/Forum/classes/class.ilForumNotification.php';
                 $frm_noti = new ilForumNotification($this->object->getRefId());
                 $frm_noti->deleteNotificationAllUsers();
             }
         }
         $this->objProperties->update();
         // print success message
         ilUtil::sendSuccess($this->lng->txt('saved_successfully'));
     }
     $this->notificationSettingsForm->setValuesByPost();
     return $this->showMembersObject();
 }
开发者ID:bheyser,项目名称:qplskl,代码行数:42,代码来源:class.ilObjForumGUI.php

示例12: importCustomDefinitionFormPostValues

 public function importCustomDefinitionFormPostValues(ilPropertyFormGUI $a_form)
 {
     $old = $this->getOptions();
     $new = $a_form->getInput("opts");
     $missing = array_diff($old, $new);
     if (sizeof($missing)) {
         $this->confirmed_objects = $this->buildConfirmedObjects($a_form);
         if (!is_array($this->confirmed_objects)) {
             $search = ilADTFactory::getInstance()->getSearchBridgeForDefinitionInstance($this->getADTDefinition(), false, false);
             ilADTFactory::initActiveRecordByType();
             foreach ($missing as $missing_value) {
                 $in_use = $this->findBySingleValue($search, $missing_value);
                 if (sizeof($in_use)) {
                     foreach ($in_use as $item) {
                         $this->confirm_objects[$missing_value][] = $item;
                     }
                 }
             }
         }
     }
     $this->old_options = $old;
     $this->setOptions($new);
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:23,代码来源:class.ilAdvancedMDFieldDefinitionSelectMulti.php

示例13: save

 /**
  * Save form input
  */
 public function save()
 {
     /** @var ilCtrl $ilCtrl */
     global $tpl, $ilCtrl;
     $this->initConfigurationForm();
     if ($this->form->checkInput()) {
         // Save Checkbox Values
         foreach ($this->checkboxes as $key => $cb) {
             if (!is_array($cb)) {
                 $this->setValue($cb, $this->form->getInput($cb));
             } else {
                 $this->setValue($key, $this->form->getInput($key));
                 foreach ($cb as $field => $gui) {
                     $this->setValue($key . '_' . $field, $this->form->getInput($key . '_' . $field));
                 }
             }
         }
         $ilCtrl->redirect($this, 'configure');
     } else {
         $this->form->setValuesByPost();
         $tpl->setContent($this->form->getHtml());
     }
 }
开发者ID:studer-raimann,项目名称:ContainerFilter,代码行数:26,代码来源:class.ilContainerFilterConfigGUI.php

示例14: saveCategory

 /**
  *
  */
 protected function saveCategory()
 {
     if (!$this->isCRUDContext()) {
         $this->{$this->getDefaultCommand()}();
         return;
     }
     $category = $this->getCategoryById((int) $_GET['category_id']);
     $this->initUnitCategoryForm($category);
     if ($this->unit_cat_form->checkInput()) {
         try {
             $category->setCategory($this->unit_cat_form->getInput('category_name'));
             $this->repository->saveCategory($category);
             ilUtil::sendSuccess($this->lng->txt('saved_successfully'));
             $this->{$this->getUnitCategoryOverviewCommand()}();
             return;
         } catch (ilException $e) {
             $this->unit_cat_form->getItemByPostVar('category_name')->setAlert($this->lng->txt($e->getMessage()));
             ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
         }
     }
     $this->unit_cat_form->setValuesByPost();
     $this->tpl->setContent($this->unit_cat_form->getHtml());
 }
开发者ID:arlendotcn,项目名称:ilias,代码行数:26,代码来源:class.ilUnitConfigurationGUI.php

示例15: updateSettings

 /**
  *	Command for saving the updated Test Overview settings.
  *
  *	This command saves the HTML form input into the Test Overview
  *	currently selected.
  */
 protected function updateSettings()
 {
     /**
      * @var $tpl    ilTemplate
      * @var $lng    ilLanguage
      * @var $ilCtrl ilCtrl
      */
     global $tpl, $lng, $ilCtrl;
     $this->initSettingsForm();
     if ($this->form->checkInput()) {
         /* Form is sent and input validated,
            now save settings. */
         $this->object->setTitle($this->form->getInput('title'));
         $this->object->setDescription($this->form->getInput('desc'));
         $this->object->update();
         ilUtil::sendSuccess($lng->txt('msg_obj_modified'), true);
         /* Back to editSettings */
         $ilCtrl->redirect($this, 'editSettings');
     }
     /* Form is sent but there is an input error.
        Fill back the form and render again. */
     $this->form->setValuesByPost();
     $tpl->setContent($this->renderSettings());
 }
开发者ID:ionesoft,项目名称:TestOverview,代码行数:30,代码来源:class.ilObjTestOverviewGUI.php


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