ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
class.assFormulaQuestionUnitCategory.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
27{
28 private int $id = 0;
29 private string $category = '';
30 private int $question_fi = 0;
31
32 public function initFormArray(array $data): void
33 {
34 $this->id = (int) $data['category_id'];
35 $this->category = $data['category'];
36 $this->question_fi = (int) $data['question_fi'];
37 }
38
39 public function setId(int $id): void
40 {
41 $this->id = $id;
42 }
43
44 public function getId(): int
45 {
46 return $this->id;
47 }
48
49 public function setCategory(string $category): void
50 {
51 $this->category = $category;
52 }
53
54 public function getCategory(): string
55 {
56 return $this->category;
57 }
58
59 public function setQuestionFi(int $question_fi): void
60 {
61 $this->question_fi = $question_fi;
62 }
63
64 public function getQuestionFi(): int
65 {
66 return $this->question_fi;
67 }
68
69 public function getDisplayString(): string
70 {
71 global $DIC;
72
73 $lng = $DIC->language();
74
75 $category = $this->getCategory();
76 if (strcmp('-qpl_qst_formulaquestion_' . $category . '-', $lng->txt('qpl_qst_formulaquestion_' . $category)) !== 0) {
77 $category = $lng->txt('qpl_qst_formulaquestion_' . $category);
78 }
79
80 return $category;
81 }
82}
global $lng
Definition: privfeed.php:31
global $DIC
Definition: shib_login.php:26