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

Public Member Functions

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

Private Member Functions

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

Additional Inherited Members

- Protected Attributes inherited from TestSettings
int $test_id
 

Detailed Description

Definition at line 25 of file ilObjTestSettingsAdditional.php.

Constructor & Destructor Documentation

◆ __construct()

ilObjTestSettingsAdditional::__construct ( int  $test_id,
protected bool  $skills_service_enabled = false,
protected bool  $hide_info_tab = false 
)

Definition at line 27 of file ilObjTestSettingsAdditional.php.

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

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

Member Function Documentation

◆ getHideInfoTab()

ilObjTestSettingsAdditional::getHideInfoTab ( )

Definition at line 99 of file ilObjTestSettingsAdditional.php.

Referenced by toForm(), and toStorage().

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

◆ getInputSkillsServiceActivation()

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

Definition at line 62 of file ilObjTestSettingsAdditional.php.

References getSkillsServiceEnabled(), ilLanguage\txt(), and ILIAS\UI\Implementation\Component\Input\withValue().

Referenced by toForm().

66  : Checkbox {
67  $skills_service_activation = $f->checkbox(
68  $lng->txt('tst_activate_skill_service'),
69  $lng->txt('tst_activate_skill_service_desc')
71 
72  if ($participant_data_exists) {
73  return $skills_service_activation->withDisabled(true);
74  }
75 
76  return $skills_service_activation;
77  }
This describes checkbox inputs.
Definition: Checkbox.php:28
$lng
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:58
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSkillsServiceEnabled()

ilObjTestSettingsAdditional::getSkillsServiceEnabled ( )

Definition at line 87 of file ilObjTestSettingsAdditional.php.

Referenced by getInputSkillsServiceActivation(), and toStorage().

87  : bool
88  {
89  return $this->skills_service_enabled;
90  }
+ Here is the caller graph for this function:

◆ toForm()

ilObjTestSettingsAdditional::toForm ( \ilLanguage  $lng,
FieldFactory  $f,
Refinery  $refinery,
array  $environment = null 
)
Returns
array<ILIAS>

Definition at line 39 of file ilObjTestSettingsAdditional.php.

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

44  : array {
45  $inputs = [];
46  if ((new ilSkillManagementSettings())->isActivated()) {
47  $inputs['skills_service_activation'] = $this->getInputSkillsServiceActivation(
48  $lng,
49  $f,
50  $environment['participant_data_exists']
51  );
52  }
53 
54  $inputs['hide_info_tab'] = $f->checkbox(
55  $lng->txt('tst_hide_info_tab'),
56  $lng->txt('tst_hide_info_tab_desc')
57  )->withValue($this->getHideInfoTab());
58 
59  return $inputs;
60  }
getInputSkillsServiceActivation(\ilLanguage $lng, FieldFactory $f, bool $participant_data_exists)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$lng
withValue($value)
Get an input like this with another value displayed on the client side.
Definition: Group.php:58
+ Here is the call graph for this function:

◆ toStorage()

ilObjTestSettingsAdditional::toStorage ( )

Definition at line 79 of file ilObjTestSettingsAdditional.php.

References getHideInfoTab(), getSkillsServiceEnabled(), and ILIAS\Repository\int().

79  : array
80  {
81  return [
82  'skill_service' => ['integer', (int) $this->getSkillsServiceEnabled()],
83  'hide_info_tab' => ['integer', (int) $this->getHideInfoTab()],
84  ];
85  }
+ Here is the call graph for this function:

◆ withHideInfoTab()

ilObjTestSettingsAdditional::withHideInfoTab ( bool  $hide_info_tab)

Definition at line 103 of file ilObjTestSettingsAdditional.php.

Referenced by ilObjTestSettingsMainGUI\getAdditionalFunctionalitySettingsForStorage().

103  : self
104  {
105  $clone = clone $this;
106  $clone->hide_info_tab = $hide_info_tab;
107  return $clone;
108  }
+ Here is the caller graph for this function:

◆ withSkillsServiceEnabled()

ilObjTestSettingsAdditional::withSkillsServiceEnabled ( bool  $skills_service_enabled)

Definition at line 92 of file ilObjTestSettingsAdditional.php.

92  : self
93  {
94  $clone = clone $this;
95  $clone->skills_service_enabled = $skills_service_enabled;
96  return $clone;
97  }

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