ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
assFormulaQuestionUnitCategory Class Reference

Formula Question Unit Category. More...

+ Collaboration diagram for assFormulaQuestionUnitCategory:

Public Member Functions

 initFormArray (array $data)
 
 setId (int $id)
 
 getId ()
 
 setCategory (string $category)
 
 getCategory ()
 
 getSanitizedCategory ()
 
 setQuestionFi (int $question_fi)
 
 getQuestionFi ()
 
 getDisplayString ()
 

Private Member Functions

 sanitizeString (string $string)
 

Private Attributes

int $id = 0
 
string $category = ''
 
int $question_fi = 0
 

Detailed Description

Formula Question Unit Category.

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m \

Definition at line 26 of file class.assFormulaQuestionUnitCategory.php.

Member Function Documentation

◆ getCategory()

assFormulaQuestionUnitCategory::getCategory ( )

◆ getDisplayString()

assFormulaQuestionUnitCategory::getDisplayString ( )

Definition at line 74 of file class.assFormulaQuestionUnitCategory.php.

74 : string
75 {
76 global $DIC;
77
78 $category = $this->getCategory();
79 $txt = $DIC->language()->txt("qpl_qst_formulaquestion_{$category}");
80 return strcmp("-qpl_qst_formulaquestion_{$category}-", $txt) !== 0
81 ? $this->sanitizeString($txt)
82 : $this->getSanitizedCategory();
83 }
global $DIC
Definition: shib_login.php:26

References $category, $DIC, getCategory(), getSanitizedCategory(), and sanitizeString().

+ Here is the call graph for this function:

◆ getId()

assFormulaQuestionUnitCategory::getId ( )

Definition at line 44 of file class.assFormulaQuestionUnitCategory.php.

References $id.

Referenced by ilUnitConfigurationRepository\saveCategory().

+ Here is the caller graph for this function:

◆ getQuestionFi()

assFormulaQuestionUnitCategory::getQuestionFi ( )

◆ getSanitizedCategory()

assFormulaQuestionUnitCategory::getSanitizedCategory ( )

Definition at line 59 of file class.assFormulaQuestionUnitCategory.php.

59 : string
60 {
61 return $this->sanitizeString($this->getCategory());
62 }

References getCategory(), and sanitizeString().

Referenced by getDisplayString().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initFormArray()

assFormulaQuestionUnitCategory::initFormArray ( array  $data)

Definition at line 32 of file class.assFormulaQuestionUnitCategory.php.

32 : void
33 {
34 $this->id = (int) $data['category_id'];
35 $this->category = $data['category'];
36 $this->question_fi = (int) $data['question_fi'];
37 }

References $data, and ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ sanitizeString()

assFormulaQuestionUnitCategory::sanitizeString ( string  $string)
private

Definition at line 85 of file class.assFormulaQuestionUnitCategory.php.

85 : string
86 {
87 return htmlspecialchars($string, ENT_QUOTES | ENT_SUBSTITUTE, 'utf-8');
88 }

Referenced by getDisplayString(), and getSanitizedCategory().

+ Here is the caller graph for this function:

◆ setCategory()

assFormulaQuestionUnitCategory::setCategory ( string  $category)

Definition at line 49 of file class.assFormulaQuestionUnitCategory.php.

49 : void
50 {
51 $this->category = $category;
52 }

References $category.

◆ setId()

assFormulaQuestionUnitCategory::setId ( int  $id)

Definition at line 39 of file class.assFormulaQuestionUnitCategory.php.

39 : void
40 {
41 $this->id = $id;
42 }

References $id.

Referenced by ilUnitConfigurationRepository\saveNewUnitCategory().

+ Here is the caller graph for this function:

◆ setQuestionFi()

assFormulaQuestionUnitCategory::setQuestionFi ( int  $question_fi)

Definition at line 64 of file class.assFormulaQuestionUnitCategory.php.

64 : void
65 {
66 $this->question_fi = $question_fi;
67 }

References $question_fi.

Field Documentation

◆ $category

string assFormulaQuestionUnitCategory::$category = ''
private

◆ $id

int assFormulaQuestionUnitCategory::$id = 0
private

Definition at line 28 of file class.assFormulaQuestionUnitCategory.php.

Referenced by getId(), and setId().

◆ $question_fi

int assFormulaQuestionUnitCategory::$question_fi = 0
private

Definition at line 30 of file class.assFormulaQuestionUnitCategory.php.

Referenced by getQuestionFi(), and setQuestionFi().


The documentation for this class was generated from the following file: