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

Public Member Functions

 __construct (protected bool $skills_service_enabled=false, protected bool $hide_info_tab=false,)
 
 toForm (\ilLanguage $lng, FieldFactory $f, Refinery $refinery, ?array $environment=null)
 
 toStorage ()
 
 toLog (AdditionalInformationGenerator $additional_info)
 
 getSkillsServiceEnabled ()
 
 withSkillsServiceEnabled (bool $skills_service_enabled)
 
 getHideInfoTab ()
 
 withHideInfoTab (bool $hide_info_tab)
 
 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...
 

Private Member Functions

 getInputSkillsServiceActivation (\ilLanguage $lng, FieldFactory $f, bool $participant_data_exists)
 

Detailed Description

Definition at line 30 of file SettingsAdditional.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Test\Settings\MainSettings\SettingsAdditional::__construct ( protected bool  $skills_service_enabled = false,
protected bool  $hide_info_tab = false 
)

Definition at line 32 of file SettingsAdditional.php.

35 {
37 }
__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\SettingsAdditional::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 132 of file SettingsAdditional.php.

132 : static
133 {
134 return new self(
135 (bool) $data['skill_service'],
136 (bool) $data['hide_info_tab'],
137 );
138 }

References $data.

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

+ Here is the caller graph for this function:

◆ getHideInfoTab()

ILIAS\Test\Settings\MainSettings\SettingsAdditional::getHideInfoTab ( )

Definition at line 113 of file SettingsAdditional.php.

113 : bool
114 {
115 return $this->hide_info_tab;
116 }

◆ getInputSkillsServiceActivation()

ILIAS\Test\Settings\MainSettings\SettingsAdditional::getInputSkillsServiceActivation ( \ilLanguage  $lng,
FieldFactory  $f,
bool  $participant_data_exists 
)
private

Definition at line 66 of file SettingsAdditional.php.

70 : Checkbox {
71 $skills_service_activation = $f->checkbox(
72 $lng->txt('tst_activate_skill_service'),
73 $lng->txt('tst_activate_skill_service_desc')
74 )->withValue($this->getSkillsServiceEnabled());
75
76 if ($participant_data_exists) {
77 return $skills_service_activation->withDisabled(true);
78 }
79
80 return $skills_service_activation;
81 }
global $lng
Definition: privfeed.php:31

Referenced by ILIAS\Test\Settings\MainSettings\SettingsAdditional\toForm().

+ Here is the caller graph for this function:

◆ getSkillsServiceEnabled()

ILIAS\Test\Settings\MainSettings\SettingsAdditional::getSkillsServiceEnabled ( )

Definition at line 101 of file SettingsAdditional.php.

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

◆ toExport()

ILIAS\Test\Settings\MainSettings\SettingsAdditional::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 124 of file SettingsAdditional.php.

124 : array
125 {
126 return [
127 'skill_service' => $this->getSkillsServiceEnabled(),
128 'hide_info_tab' => $this->getHideInfoTab(),
129 ];
130 }

◆ toForm()

ILIAS\Test\Settings\MainSettings\SettingsAdditional::toForm ( \ilLanguage  $lng,
FieldFactory  $f,
Refinery  $refinery,
?array  $environment = null 
)
Returns
array<ILIAS\UI\Component\Input\Container\Form\FormInput>

Reimplemented from ILIAS\Test\Settings\TestSettings.

Definition at line 43 of file SettingsAdditional.php.

48 : array {
49 $inputs = [];
50 if ((new \ilSkillManagementSettings())->isActivated()) {
51 $inputs['skills_service_activation'] = $this->getInputSkillsServiceActivation(
52 $lng,
53 $f,
54 $environment['participant_data_exists']
55 );
56 }
57
58 $inputs['hide_info_tab'] = $f->checkbox(
59 $lng->txt('tst_hide_info_tab'),
60 $lng->txt('tst_hide_info_tab_desc')
61 )->withValue($this->getHideInfoTab());
62
63 return $inputs;
64 }
getInputSkillsServiceActivation(\ilLanguage $lng, FieldFactory $f, bool $participant_data_exists)

References Vendor\Package\$f, ILIAS\UI\Implementation\Component\Input\$inputs, and ILIAS\Test\Settings\MainSettings\SettingsAdditional\getInputSkillsServiceActivation().

+ Here is the call graph for this function:

◆ toLog()

◆ toStorage()

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

Reimplemented from ILIAS\Test\Settings\TestSettings.

Definition at line 83 of file SettingsAdditional.php.

83 : array
84 {
85 return [
86 'skill_service' => ['integer', (int) $this->getSkillsServiceEnabled()],
87 'hide_info_tab' => ['integer', (int) $this->getHideInfoTab()],
88 ];
89 }

References ILIAS\Repository\int().

+ Here is the call graph for this function:

◆ withHideInfoTab()

ILIAS\Test\Settings\MainSettings\SettingsAdditional::withHideInfoTab ( bool  $hide_info_tab)

Definition at line 117 of file SettingsAdditional.php.

117 : self
118 {
119 $clone = clone $this;
120 $clone->hide_info_tab = $hide_info_tab;
121 return $clone;
122 }

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

+ Here is the caller graph for this function:

◆ withSkillsServiceEnabled()

ILIAS\Test\Settings\MainSettings\SettingsAdditional::withSkillsServiceEnabled ( bool  $skills_service_enabled)

Definition at line 106 of file SettingsAdditional.php.

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

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