ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
ILIAS\Test\Settings\MainSettings\SettingsIntroduction Class Reference
+ Inheritance diagram for ILIAS\Test\Settings\MainSettings\SettingsIntroduction:
+ Collaboration diagram for ILIAS\Test\Settings\MainSettings\SettingsIntroduction:

Public Member Functions

 __construct (protected bool $introduction_enabled=false, protected ?int $introduction_page_id=null, protected bool $conditions_checkbox_enabled=false,)
 
 toForm (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, ?array $environment=null)
 
 toStorage ()
 
 toLog (AdditionalInformationGenerator $additional_info)
 
 getIntroductionEnabled ()
 
 withIntroductionEnabled (bool $introduction_enabled)
 
 getIntroductionPageId ()
 
 withIntroductionPageId (?int $introduction_page_id)
 
 getExamConditionsCheckboxEnabled ()
 
 withExamConditionsCheckboxEnabled (bool $conditions_checkbox_enabled)
 
 toExport ()
 Transform the object into a simple, associative array. More...
 
- Public Member Functions inherited from ILIAS\Test\Settings\TestSettings
 __construct ()
 
 toForm (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, ?array $environment=null)
 
 toStorage ()
 
 toLog (AdditionalInformationGenerator $additional_info)
 
 toExport ()
 Transform the object into a simple, associative array. More...
 

Static Public Member Functions

static fromExport (array $data)
 Creates an instance of the object from an array. More...
 
static fromExport (array $data)
 Creates an instance of the object from an array. More...
 

Detailed Description

Definition at line 30 of file SettingsIntroduction.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Test\Settings\MainSettings\SettingsIntroduction::__construct ( protected bool  $introduction_enabled = false,
protected ?int  $introduction_page_id = null,
protected bool  $conditions_checkbox_enabled = false 
)

Definition at line 32 of file SettingsIntroduction.php.

36 {
38 }
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References ILIAS\GlobalScreen\Provider\__construct().

+ Here is the call graph for this function:

Member Function Documentation

◆ fromExport()

static ILIAS\Test\Settings\MainSettings\SettingsIntroduction::fromExport ( array  $data)
static

Creates an instance of the object from an array.

This static factory method is responsible for constructing a new object instance from the provided array data. It should validate the input and may throw an exception if the data is incomplete or malformed.

Parameters
ExportableArray$dataThe data to restore the object from
Returns
static A new instance of the class

Implements ILIAS\Test\ExportImport\Exportable.

Definition at line 121 of file SettingsIntroduction.php.

121 : static
122 {
123 return new self(
124 (bool) $data['intro_enabled'],
125 $data['introduction_page_id'],
126 (bool) $data['conditions_checkbox_enabled'],
127 );
128 }

References $data.

Referenced by ILIAS\Test\Settings\MainSettings\MainSettings\fromExport().

+ Here is the caller graph for this function:

◆ getExamConditionsCheckboxEnabled()

ILIAS\Test\Settings\MainSettings\SettingsIntroduction::getExamConditionsCheckboxEnabled ( )

Definition at line 101 of file SettingsIntroduction.php.

101 : bool
102 {
103 return $this->conditions_checkbox_enabled;
104 }

◆ getIntroductionEnabled()

ILIAS\Test\Settings\MainSettings\SettingsIntroduction::getIntroductionEnabled ( )

Definition at line 78 of file SettingsIntroduction.php.

78 : bool
79 {
80 return $this->introduction_enabled;
81 }

◆ getIntroductionPageId()

ILIAS\Test\Settings\MainSettings\SettingsIntroduction::getIntroductionPageId ( )

Definition at line 90 of file SettingsIntroduction.php.

90 : ?int
91 {
92 return $this->introduction_page_id;
93 }

◆ toExport()

ILIAS\Test\Settings\MainSettings\SettingsIntroduction::toExport ( )

Transform the object into a simple, associative array.

The resulting array represents the object's state and should contain only scalar values, arrays, or other Exportable objects.

Returns
ExportableArray The exportable array representation of the object

Implements ILIAS\Test\ExportImport\Exportable.

Definition at line 112 of file SettingsIntroduction.php.

112 : array
113 {
114 return [
115 'intro_enabled' => $this->getIntroductionEnabled(),
116 'introduction_page_id' => $this->getIntroductionPageId(),
117 'conditions_checkbox_enabled' => $this->getExamConditionsCheckboxEnabled()
118 ];
119 }

◆ toForm()

ILIAS\Test\Settings\MainSettings\SettingsIntroduction::toForm ( \ilLanguage  $lng,
FieldFactory  $f,
Refinery  $refinery,
?array  $environment = null 
)

Reimplemented from ILIAS\Test\Settings\TestSettings.

Definition at line 40 of file SettingsIntroduction.php.

45 : FormInput {
46 $inputs['introduction_enabled'] = $f->checkbox(
47 $lng->txt('tst_introduction'),
48 $lng->txt('tst_introduction_desc')
49 )->withValue($this->getIntroductionEnabled());
50
51 $inputs['conditions_checkbox_enabled'] = $f->checkbox(
52 $lng->txt('tst_conditions_checkbox_enabled'),
53 $lng->txt('tst_conditions_checkbox_enabled_desc')
54 )->withValue($this->getExamConditionsCheckboxEnabled());
55
56 return $f->section($inputs, $lng->txt('tst_settings_header_intro'));
57 }
global $lng
Definition: privfeed.php:31

◆ toLog()

◆ toStorage()

ILIAS\Test\Settings\MainSettings\SettingsIntroduction::toStorage ( )

Reimplemented from ILIAS\Test\Settings\TestSettings.

Definition at line 59 of file SettingsIntroduction.php.

59 : array
60 {
61 return [
62 'intro_enabled' => ['integer', (int) $this->getIntroductionEnabled()],
63 'introduction_page_id' => ['integer', $this->getIntroductionPageId()],
64 'conditions_checkbox_enabled' => ['integer', (int) $this->getExamConditionsCheckboxEnabled()],
65 ];
66 }

References ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ withExamConditionsCheckboxEnabled()

ILIAS\Test\Settings\MainSettings\SettingsIntroduction::withExamConditionsCheckboxEnabled ( bool  $conditions_checkbox_enabled)

Definition at line 105 of file SettingsIntroduction.php.

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

◆ withIntroductionEnabled()

ILIAS\Test\Settings\MainSettings\SettingsIntroduction::withIntroductionEnabled ( bool  $introduction_enabled)

Definition at line 83 of file SettingsIntroduction.php.

83 : self
84 {
85 $clone = clone $this;
86 $clone->introduction_enabled = $introduction_enabled;
87 return $clone;
88 }

Referenced by ILIAS\Test\Settings\MainSettings\SettingsMainGUI\getIntroductionSettingsForStorage().

+ Here is the caller graph for this function:

◆ withIntroductionPageId()

ILIAS\Test\Settings\MainSettings\SettingsIntroduction::withIntroductionPageId ( ?int  $introduction_page_id)

Definition at line 94 of file SettingsIntroduction.php.

94 : self
95 {
96 $clone = clone $this;
97 $clone->introduction_page_id = $introduction_page_id;
98 return $clone;
99 }

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