ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Structure.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
28{
32 private array $tabs = [];
33
34 public function add(Tab $tab): void
35 {
36 $this->tabs[$tab->getId()] = $tab;
37 }
38
42 public function get(): array
43 {
44 return $this->tabs;
45 }
46
47 public function getById(string $id): ?Tab
48 {
49 return $this->tabs[$id] ?? null;
50 }
51
52 public function getByHandlingClass(string $handling_class): ?Tab
53 {
54 $handling_class = strtolower($handling_class);
55 foreach ($this->tabs as $tab) {
56 if (strtolower($tab->getHandlingClass()) === strtolower($handling_class)) {
57 return $tab;
58 }
59 }
60 return null;
61 }
62
63}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
getByHandlingClass(string $handling_class)
Definition: Structure.php:52