19 declare(strict_types=1);
38 private readonly
string $filter_id,
39 private readonly
string $parent_title
46 $is_input_initially_rendered = [];
47 $field_factory = $this->ui_factory->input()->field();
49 foreach ($this->
getFields($field_factory) as $filter_id => $filter) {
50 [$filter_inputs[$filter_id], $is_input_initially_rendered[$filter_id]] = $filter;
53 $component = $this->ui_service->filter()->standard(
57 $is_input_initially_rendered,
62 return $request->getMethod() ===
'POST' ? $component->withRequest($request) : $component;
72 $lifecycle_options = array_merge(
73 [
'' => $this->
lng->txt(
'qst_lifecycle_filter_all')],
76 $yes_no_all_options = [
77 '' => $this->
lng->txt(
'resulttable_all'),
78 'true' => $this->
lng->txt(
'yes'),
79 'false' => $this->
lng->txt(
'no')
83 'title' => [$input->text($this->
lng->txt(
'tst_question_title')),
true],
84 'description' => [$input->text($this->lng->txt(
'description')),
false],
86 'author' => [$input->text($this->lng->txt(
'author')),
false],
87 'lifecycle' => [$input->select($this->lng->txt(
'qst_lifecycle'), $lifecycle_options),
false],
88 'parent_title' => [$input->text($this->lng->txt($this->parent_title)),
true],
89 'taxonomy_title' => [$input->text($this->lng->txt(
'taxonomy_title')),
true],
90 'taxonomy_node_title' => [$input->text($this->lng->txt(
'taxonomy_node_title')),
true],
91 'feedback' => [$input->select($this->lng->txt(
'feedback'), $yes_no_all_options),
false],
92 'hints' => [$input->select($this->lng->txt(
'hints'), $yes_no_all_options),
false]
98 $question_type_options = [
'' => $this->
lng->txt(
'filter_all_question_types')];
101 $question_type_options[$row[
'type_tag']] = $translation;
103 return $question_type_options;
getComponent(string $action, ServerRequestInterface $request)
getFields(FieldFactory $input)
resolveQuestionTypeFilterOptions()
__construct(private readonly ilUIService $ui_service, private readonly ilLanguage $lng, private readonly UIFactory $ui_factory, private readonly string $filter_id, private readonly string $parent_title)
static getDraftInstance()
static _getQuestionTypes($all_tags=false, $fixOrder=false, $withDeprecatedTypes=true)