From 955c5457d98a4b08804fa0619396b8da38d83d00 Mon Sep 17 00:00:00 2001 From: Eric Lippmann Date: Thu, 31 Oct 2019 16:17:29 +0100 Subject: [PATCH] Introduce HostgroupsController --- .../controllers/HostgroupsController.php | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 application/controllers/HostgroupsController.php diff --git a/application/controllers/HostgroupsController.php b/application/controllers/HostgroupsController.php new file mode 100644 index 00000000..afc5b945 --- /dev/null +++ b/application/controllers/HostgroupsController.php @@ -0,0 +1,33 @@ +setTitle($this->translate('Host Groups')); + + $db = $this->getDb(); + + $hostgroups = Hostgroupsummary::on($db); + + $limitControl = $this->createLimitControl(); + $paginationControl = $this->createPaginationControl($hostgroups); + $filterControl = $this->createFilterControl($hostgroups); + + $this->filter($hostgroups); + + yield $this->export($hostgroups); + + $this->addControl($paginationControl); + $this->addControl($limitControl); + $this->addControl($filterControl); + + $this->addContent(new HostgroupList($hostgroups)); + } +}