ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
TestSettings.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\Test\Settings;
22 
24 
25 use ILIAS\UI\Component\Input\Field\Factory as FieldFactory;
28 
29 abstract class TestSettings
30 {
31  protected int $test_id;
32 
33  public function __construct(int $test_id)
34  {
35  $this->test_id = $test_id;
36  }
37 
38  public function getTestId(): int
39  {
40  return $this->test_id;
41  }
42  public function withTestId(int $test_id): self
43  {
44  $clone = clone $this;
45  $clone->test_id = $test_id;
46  return $clone;
47  }
48 
49  abstract public function toForm(
51  FieldFactory $f,
53  array $environment = null
54  ): FormInput | array;
55 
56  abstract public function toStorage(): array;
57 
58  abstract public function toLog(AdditionalInformationGenerator $additional_info): array;
59 }
This is what a factory for input fields looks like.
Definition: Factory.php:28
global $lng
Definition: privfeed.php:32
This describes inputs that can be used in forms.
Definition: FormInput.php:31
toLog(AdditionalInformationGenerator $additional_info)
toForm(\ilLanguage $lng, FieldFactory $f, Refinery $refinery, array $environment=null)