mirror of
https://github.com/fruithost/Panel.git
synced 2026-11-30 20:35:44 +09:00
33 lines
717 B
PHP
33 lines
717 B
PHP
<?php
|
|
namespace fruithost;
|
|
|
|
class TemplateNavigation {
|
|
private $core = null;
|
|
private $entries = [];
|
|
|
|
public function __construct(Core $core) {
|
|
$this->core = $core;
|
|
}
|
|
|
|
public function addCategory(string $name, string $label) {
|
|
$category = new TemplateNavigationCategory($this, $name, $label);
|
|
$this->entries[$category->getID()] = $category;
|
|
}
|
|
|
|
public function getCore() : Core {
|
|
return $this->core;
|
|
}
|
|
|
|
public function getCategory(string $name) : TemplateNavigationCategory {
|
|
return $this->entries[$name];
|
|
}
|
|
|
|
public function isEmpty() : bool {
|
|
return (count($this->entries) === 0);
|
|
}
|
|
|
|
public function getEntries() : array {
|
|
return $this->entries;
|
|
}
|
|
}
|
|
?>
|