19declare(strict_types=1);
33 protected bool $introduction_enabled =
false,
34 protected ?
int $introduction_page_id =
null,
35 protected bool $conditions_checkbox_enabled =
false,
44 ?array $environment =
null
46 $inputs[
'introduction_enabled'] =
$f->checkbox(
47 $lng->txt(
'tst_introduction'),
48 $lng->txt(
'tst_introduction_desc')
51 $inputs[
'conditions_checkbox_enabled'] =
$f->checkbox(
52 $lng->txt(
'tst_conditions_checkbox_enabled'),
53 $lng->txt(
'tst_conditions_checkbox_enabled_desc')
56 return $f->section(
$inputs,
$lng->txt(
'tst_settings_header_intro'));
62 'intro_enabled' => [
'integer', (
int) $this->getIntroductionEnabled()],
63 'introduction_page_id' => [
'integer', $this->getIntroductionPageId()],
64 'conditions_checkbox_enabled' => [
'integer', (
int) $this->getExamConditionsCheckboxEnabled()],
80 return $this->introduction_enabled;
86 $clone->introduction_enabled = $introduction_enabled;
92 return $this->introduction_page_id;
97 $clone->introduction_page_id = $introduction_page_id;
103 return $this->conditions_checkbox_enabled;
107 $clone = clone $this;
108 $clone->conditions_checkbox_enabled = $conditions_checkbox_enabled;
115 'intro_enabled' => $this->getIntroductionEnabled(),
116 'introduction_page_id' => $this->getIntroductionPageId(),
117 'conditions_checkbox_enabled' => $this->getExamConditionsCheckboxEnabled()
124 (bool)
$data[
'intro_enabled'],
125 $data[
'introduction_page_id'],
126 (
bool)
$data[
'conditions_checkbox_enabled'],
withIntroductionEnabled(bool $introduction_enabled)
toForm(\ilLanguage $lng, FieldFactory $f, Refinery $refinery, ?array $environment=null)
withIntroductionPageId(?int $introduction_page_id)
toExport()
Transform the object into a simple, associative array.
withExamConditionsCheckboxEnabled(bool $conditions_checkbox_enabled)
static fromExport(array $data)
Creates an instance of the object from an array.
__construct(protected bool $introduction_enabled=false, protected ?int $introduction_page_id=null, protected bool $conditions_checkbox_enabled=false,)
toLog(AdditionalInformationGenerator $additional_info)
getExamConditionsCheckboxEnabled()
This interface allows an object to define its own transformation into a language-neutral,...
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...