本文整理汇总了PHP中ilNonEditableValueGUI::setDisabled方法的典型用法代码示例。如果您正苦于以下问题:PHP ilNonEditableValueGUI::setDisabled方法的具体用法?PHP ilNonEditableValueGUI::setDisabled怎么用?PHP ilNonEditableValueGUI::setDisabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilNonEditableValueGUI
的用法示例。
在下文中一共展示了ilNonEditableValueGUI::setDisabled方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: buildForm
/**
* builds the question set config form and initialises the fields
* with the config currently saved in database
*
* @return ilPropertyFormGUI $form
*/
private function buildForm()
{
$this->questionSetConfig->loadFromDb($this->testOBJ->getTestId());
require_once 'Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setId("tst_form_dynamic_question_set_config");
$form->setTitle($this->lng->txt('tst_form_dynamic_question_set_config'));
$form->setTableWidth("100%");
$hiddenInputTaxSelectOptAsyncUrl = new ilHiddenInputGUI('taxSelectOptAsyncUrl');
$hiddenInputTaxSelectOptAsyncUrl->setValue($this->ctrl->getLinkTarget($this, self::CMD_GET_TAXONOMY_OPTIONS_ASYNC, '', true));
$form->addItem($hiddenInputTaxSelectOptAsyncUrl);
if ($this->testOBJ->participantDataExist()) {
$pool = new ilNonEditableValueGUI($this->lng->txt('tst_input_dynamic_question_set_source_questionpool'), 'source_qpl_title');
$pool->setValue($this->questionSetConfig->getSourceQuestionPoolSummaryString($this->lng, $this->tree));
$pool->setDisabled(true);
$form->addItem($pool);
} else {
$poolInput = new ilSelectInputGUI($this->lng->txt('tst_input_dynamic_question_set_source_questionpool'), 'source_qpl_id');
$poolInput->setOptions($this->buildQuestionPoolSelectInputOptionArray($this->testOBJ->getAvailableQuestionpools(true, false, false, true, true)));
$poolInput->setValue($this->questionSetConfig->getSourceQuestionPoolId());
$poolInput->setRequired(true);
$form->addItem($poolInput);
}
$questionOderingInput = new ilRadioGroupInputGUI($this->lng->txt('tst_input_dynamic_question_set_question_ordering'), 'question_ordering');
$questionOderingInput->setValue($this->questionSetConfig->getOrderingTaxonomyId() ? self::QUESTION_ORDERING_TYPE_TAXONOMY : self::QUESTION_ORDERING_TYPE_UPDATE_DATE);
$optionOrderByDate = new ilRadioOption($this->lng->txt('tst_input_dynamic_question_set_question_ordering_by_date'), self::QUESTION_ORDERING_TYPE_UPDATE_DATE, $this->lng->txt('tst_inp_dyn_quest_set_quest_ordering_by_date_desc'));
$questionOderingInput->addOption($optionOrderByDate);
$optionOrderByTax = new ilRadioOption($this->lng->txt('tst_input_dynamic_question_set_question_ordering_by_tax'), self::QUESTION_ORDERING_TYPE_TAXONOMY, $this->lng->txt('tst_inp_dyn_quest_set_quest_ordering_by_tax_desc'));
$orderTaxInput = new ilSelectInputGUI($this->lng->txt('tst_input_dynamic_question_set_ordering_tax'), 'ordering_tax');
$orderTaxInput->setInfo($this->lng->txt('tst_input_dynamic_question_set_ordering_tax_description'));
$orderTaxInput->setValue($this->questionSetConfig->getOrderingTaxonomyId());
$orderTaxInput->setRequired(true);
$orderTaxInput->setOptions($this->buildTaxonomySelectInputOptionArray($this->questionSetConfig->getSourceQuestionPoolId()));
$optionOrderByTax->addSubItem($orderTaxInput);
$questionOderingInput->addOption($optionOrderByTax);
$form->addItem($questionOderingInput);
$taxFilterInput = new ilCheckboxInputGUI($this->lng->txt('tst_input_dynamic_question_set_taxonomie_filter_enabled'), 'tax_filter_enabled');
$taxFilterInput->setValue(1);
$taxFilterInput->setChecked($this->questionSetConfig->isTaxonomyFilterEnabled());
$form->addItem($taxFilterInput);
$answStatusFilterInput = new ilCheckboxInputGUI($this->lng->txt('tst_input_dyn_quest_set_answer_status_filter_enabled'), 'answer_status_filter_enabled');
$answStatusFilterInput->setValue(1);
$answStatusFilterInput->setChecked($this->questionSetConfig->isAnswerStatusFilterEnabled());
$form->addItem($answStatusFilterInput);
$previousQuestionsListInput = new ilCheckboxInputGUI($this->lng->txt('tst_input_dyn_quest_set_prev_quest_list_enabled'), 'prev_quest_list_enabled');
$previousQuestionsListInput->setValue(1);
$previousQuestionsListInput->setChecked($this->questionSetConfig->isPreviousQuestionsListEnabled());
$form->addItem($previousQuestionsListInput);
if ($this->testOBJ->participantDataExist()) {
$questionOderingInput->setDisabled(true);
$taxFilterInput->setDisabled(true);
$answStatusFilterInput->setDisabled(true);
$previousQuestionsListInput->setDisabled(true);
} else {
$form->addCommandButton(self::CMD_SAVE_FORM, $this->lng->txt('save'));
}
return $form;
}