ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Vocabulary.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
24
26{
27 protected SlotIdentifier $slot;
28 protected Type $type;
29 protected string $id;
30 protected string $source;
31 protected bool $is_active;
32 protected bool $allows_custom_inputs;
33
37 protected array $values;
38
39 public function __construct(
40 SlotIdentifier $slot,
41 Type $type,
42 string $id,
43 string $source,
44 bool $is_active = true,
45 bool $allows_custom_inputs = false,
46 string ...$values
47 ) {
48 $this->slot = $slot;
49 $this->type = $type;
50 $this->id = $id;
51 $this->source = $source;
52 $this->values = $values;
53 $this->is_active = $is_active;
54 $this->allows_custom_inputs = $allows_custom_inputs;
55 }
56
57 public function slot(): SlotIdentifier
58 {
59 return $this->slot;
60 }
61
62 public function type(): Type
63 {
64 return $this->type;
65 }
66
67 public function id(): string
68 {
69 return $this->id;
70 }
71
72 public function source(): string
73 {
74 return $this->source;
75 }
76
80 public function values(): \Generator
81 {
82 foreach ($this->values as $value) {
83 yield $value;
84 }
85 }
86
87 public function isActive(): bool
88 {
89 return $this->is_active;
90 }
91
92 public function allowsCustomInputs(): bool
93 {
95 }
96}
__construct(SlotIdentifier $slot, Type $type, string $id, string $source, bool $is_active=true, bool $allows_custom_inputs=false, string ... $values)
Definition: Vocabulary.php:39