19 declare(strict_types=1);
52 protected int $path_id,
53 protected string $tag_name,
54 protected array $indices
60 return new class ($this->tag_name, $this->indices) extends
NullTag {
62 protected string $name,
63 protected array $indices
67 public function name()
72 public function indices(): \Generator
74 yield
from $this->indices;
77 public function isRestrictedToIndices():
bool 79 return !empty($this->indices);
86 return (
string) $this->path_id === $path->
toString();
106 public function toElement(
108 bool $leads_to_exactly_one =
false 124 public function navigator(
135 if ($start_element->
getMDID() === 0) {
136 $this->start_element = $start_element;
142 public function elementsAtFinalStep(): \Generator
144 if ($this->path->toString() ===
'0') {
145 yield $this->start_element;
149 foreach ($this->start_element->getSubElements() as $sub) {
150 if ((
string) $sub->getMDID() === $this->path->toString()) {
159 return new class ($path_factory, $navigator_factory, ...$tag_assignments) extends
Dictionary {
178 protected array $subs
189 public function name():
string 196 public function getSubElements(): \Generator
198 yield
from $this->subs;
208 $this->super = $super;
211 public function getMDID():
int|
NoID 225 $el0 = $this->
getElement(0, $el2, $el10, $el11, $el12, $el3);
227 $el2->setSuperElement($el0);
228 $el10->setSuperElement($el0);
229 $el11->setSuperElement($el0);
230 $el12->setSuperElement($el0);
231 $el3->setSuperElement($el0);
246 $tags = $dict->tagsForElement($this->
getElements()[
'el2']);
250 $tags->current()->name()
255 $tags->current()->name()
258 $this->assertNull($tags->current());
260 $tags = $dict->tagsForElement($this->
getElements()[
'el3']);
261 $this->assertNull($tags->current());
268 $tags10 = $dict->tagsForElement($this->
getElements()[
'el10']);
269 $tags11 = $dict->tagsForElement($this->
getElements()[
'el11']);
270 $tags12 = $dict->tagsForElement($this->
getElements()[
'el12']);
273 'tag 1 index 0 and 1',
274 $tags10->current()->name()
277 $this->assertNull($tags10->current());
281 $tags11->current()->name()
285 'tag 1 index 0 and 1',
286 $tags11->current()->name()
290 'tag 1 index -3 and 1',
291 $tags11->current()->name()
294 $this->assertNull($tags11->current());
296 $this->assertNull($tags12->current());
302 $tags = $dict->tagsForElement($this->
getElements()[
'el0']);
306 $tags->current()->name()
311 $tags->current()->name()
314 $this->assertNull($tags->current());
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
__construct()
Constructor setup ILIAS global object public.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
__construct(Container $dic, ilPlugin $plugin)