當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。