ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
ilObjTestSettingsIntroduction Class Reference
+ Inheritance diagram for ilObjTestSettingsIntroduction:
+ Collaboration diagram for ilObjTestSettingsIntroduction:

Public Member Functions

 __construct (int $test_id, protected bool $introduction_enabled=false, protected ?string $introduction_text=null, protected ?int $introduction_page_id=null, protected bool $conditions_checkbox_enabled=false,)
 
 toForm (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment=null)
 
 toStorage ()
 
 getIntroductionEnabled ()
 
 withIntroductionEnabled (bool $introduction_enabled)
 
 getIntroductionText ()
 
 withIntroductionText (?string $introduction_text)
 
 getIntroductionPageId ()
 
 withIntroductionPageId (?int $introduction_page_id)
 
 getExamConditionsCheckboxEnabled ()
 
 withExamConditionsCheckboxEnabled (bool $conditions_checkbox_enabled)
 
- Public Member Functions inherited from TestSettings
 __construct (int $test_id)
 
 getTestId ()
 
 withTestId (int $test_id)
 
 toForm (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment=null)
 
 toStorage ()
 

Additional Inherited Members

- Protected Attributes inherited from TestSettings
int $test_id
 

Detailed Description

Definition at line 25 of file ilObjTestSettingsIntroduction.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjTestSettingsIntroduction::__construct ( int  $test_id,
protected bool  $introduction_enabled = false,
protected ?string  $introduction_text = null,
protected ?int  $introduction_page_id = null,
protected bool  $conditions_checkbox_enabled = false 
)

Definition at line 27 of file ilObjTestSettingsIntroduction.php.

References ILIAS\MetaData\Repository\Validation\Data\__construct().

33  {
35  }
__construct(VocabulariesInterface $vocabularies)
+ Here is the call graph for this function:

Member Function Documentation

◆ getExamConditionsCheckboxEnabled()

ilObjTestSettingsIntroduction::getExamConditionsCheckboxEnabled ( )

Definition at line 99 of file ilObjTestSettingsIntroduction.php.

Referenced by toForm(), and toStorage().

99  : bool
100  {
101  return $this->conditions_checkbox_enabled;
102  }
+ Here is the caller graph for this function:

◆ getIntroductionEnabled()

ilObjTestSettingsIntroduction::getIntroductionEnabled ( )

Definition at line 66 of file ilObjTestSettingsIntroduction.php.

Referenced by toForm(), and toStorage().

66  : bool
67  {
68  return $this->introduction_enabled;
69  }
+ Here is the caller graph for this function:

◆ getIntroductionPageId()

ilObjTestSettingsIntroduction::getIntroductionPageId ( )

Definition at line 88 of file ilObjTestSettingsIntroduction.php.

Referenced by toStorage().

88  : ?int
89  {
90  return $this->introduction_page_id;
91  }
+ Here is the caller graph for this function:

◆ getIntroductionText()

ilObjTestSettingsIntroduction::getIntroductionText ( )

Definition at line 77 of file ilObjTestSettingsIntroduction.php.

Referenced by toStorage().

77  : string
78  {
79  return $this->introduction_text ?? '';
80  }
+ Here is the caller graph for this function:

◆ toForm()

ilObjTestSettingsIntroduction::toForm ( \ilLanguage  $lng,
FieldFactory  $f,
Refinery  $refinery,
array  $environment = null 
)

Definition at line 37 of file ilObjTestSettingsIntroduction.php.

References ILIAS\UI\Implementation\Component\Input\$inputs, getExamConditionsCheckboxEnabled(), getIntroductionEnabled(), ilLanguage\txt(), and ILIAS\UI\Implementation\Component\Input\withValue().

42  : FormInput {
43  $inputs['introduction_enabled'] = $f->checkbox(
44  $lng->txt('tst_introduction'),
45  $lng->txt('tst_introduction_desc')
46  )->withValue($this->getIntroductionEnabled());
47 
48  $inputs['conditions_checkbox_enabled'] = $f->checkbox(
49  $lng->txt('tst_conditions_checkbox_enabled'),
50  $lng->txt('tst_conditions_checkbox_enabled_desc')
52 
53  return $f->section($inputs, $lng->txt('tst_settings_header_intro'));
54  }
$lng
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:58
This describes inputs that can be used in forms.
Definition: FormInput.php:31
+ Here is the call graph for this function:

◆ toStorage()

ilObjTestSettingsIntroduction::toStorage ( )

Definition at line 56 of file ilObjTestSettingsIntroduction.php.

References getExamConditionsCheckboxEnabled(), getIntroductionEnabled(), getIntroductionPageId(), getIntroductionText(), and ILIAS\Repository\int().

56  : array
57  {
58  return [
59  'intro_enabled' => ['integer', (int) $this->getIntroductionEnabled()],
60  'introduction' => ['text', $this->getIntroductionText()],
61  'introduction_page_id' => ['integer', $this->getIntroductionPageId()],
62  'conditions_checkbox_enabled' => ['integer', (int) $this->getExamConditionsCheckboxEnabled()],
63  ];
64  }
+ Here is the call graph for this function:

◆ withExamConditionsCheckboxEnabled()

ilObjTestSettingsIntroduction::withExamConditionsCheckboxEnabled ( bool  $conditions_checkbox_enabled)

Definition at line 103 of file ilObjTestSettingsIntroduction.php.

103  : self
104  {
105  $clone = clone $this;
106  $clone->conditions_checkbox_enabled = $conditions_checkbox_enabled;
107  return $clone;
108  }

◆ withIntroductionEnabled()

ilObjTestSettingsIntroduction::withIntroductionEnabled ( bool  $introduction_enabled)

Definition at line 70 of file ilObjTestSettingsIntroduction.php.

Referenced by ilObjTestSettingsMainGUI\getIntroductionSettingsForStorage().

70  : self
71  {
72  $clone = clone $this;
73  $clone->introduction_enabled = $introduction_enabled;
74  return $clone;
75  }
+ Here is the caller graph for this function:

◆ withIntroductionPageId()

ilObjTestSettingsIntroduction::withIntroductionPageId ( ?int  $introduction_page_id)

Definition at line 92 of file ilObjTestSettingsIntroduction.php.

Referenced by ilObjTest\addIntroductionToSettingsFromImport().

92  : self
93  {
94  $clone = clone $this;
95  $clone->introduction_page_id = $introduction_page_id;
96  return $clone;
97  }
+ Here is the caller graph for this function:

◆ withIntroductionText()

ilObjTestSettingsIntroduction::withIntroductionText ( ?string  $introduction_text)

Definition at line 81 of file ilObjTestSettingsIntroduction.php.

81  : self
82  {
83  $clone = clone $this;
84  $clone->introduction_text = $introduction_text;
85  return $clone;
86  }

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