ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
NullOption.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
23class NullOption implements Option
24{
25 public function optionID(): ?int
26 {
27 return null;
28 }
29
30 public function getPosition(): int
31 {
32 return 0;
33 }
34
35 public function setPosition(int $position): void
36 {
37 }
38
39 public function getTranslations(): \Generator
40 {
41 yield from [];
42 }
43
44 public function hasTranslationInLanguage(string $language): bool
45 {
46 return false;
47 }
48
49 public function getTranslationInLanguage(string $language): ?OptionTranslation
50 {
51 return null;
52 }
53
54 public function addTranslation(string $language): OptionTranslation
55 {
56 return new NullOptionTranslation();
57 }
58
59 public function removeTranslation(string $language): void
60 {
61 }
62
63 public function isPersisted(): bool
64 {
65 return false;
66 }
67
68 public function containsChanges(): bool
69 {
70 return false;
71 }
72}
containsChanges()
Was the contained data altered with respect to what is persisted? Returns true if not persisted.
Definition: NullOption.php:68
addTranslation(string $language)
Returns the new translation such that it can be configured.
Definition: NullOption.php:54