'home-list-control']; public function __construct(DashboardHome $home) { $this->home = $home; $this->home->setActive(); $this->home->loadDashboardEntries(); $this->getAttributes() ->registerAttributeCallback('data-icinga-home', function () { return $this->home->getName(); }); } protected function getHtmlId(): string { return $this->home->getUuid(); } protected function getCollapsibleControlClass(): string { return 'dashboard-list-info'; } protected function createItemList(): BaseHtmlElement { $url = Url::fromPath(Dashboard::BASE_ROUTE . '/edit-home') ->setParams(['home' => $this->home->getName()]); $this->assembleHeader($url, $this->home->getTitle()); $list = HtmlElement::create('ul', ['class' => 'dashboard-item-list']); // List all dashboard panes foreach ($this->home->getEntries() as $pane) { $pane->setHome($this->home); // In case it's not set $list->addHtml(new DashboardList($pane)); } return $list; } protected function createActionLink(): BaseHtmlElement { $url = Url::fromPath(Dashboard::BASE_ROUTE . '/new-pane'); $url->setParams(['home' => $this->home->getName()]); return new ActionLink(t('Add Dashboard'), $url, 'plus', ['class' => 'add-dashboard']); } }