From 30868c16a1675baef2f8a0c06145ba700c31fa90 Mon Sep 17 00:00:00 2001 From: Thomas Gelf Date: Sat, 27 Feb 2016 01:14:27 +0100 Subject: [PATCH] notification(s): controllers, table --- .../controllers/NotificationController.php | 9 ++++ .../controllers/NotificationsController.php | 9 ++++ .../tables/IcingaNotificationTable.php | 50 +++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 application/controllers/NotificationController.php create mode 100644 application/controllers/NotificationsController.php create mode 100644 application/tables/IcingaNotificationTable.php diff --git a/application/controllers/NotificationController.php b/application/controllers/NotificationController.php new file mode 100644 index 00000000..e98550e6 --- /dev/null +++ b/application/controllers/NotificationController.php @@ -0,0 +1,9 @@ + 'n.id', + 'object_type' => 'n.object_type', + 'notification' => 'n.object_name', + ); + } + + protected function getActionUrl($row) + { + return $this->url('director/notification', array('id' => $row->id)); + } + + public function getTitles() + { + $view = $this->view(); + return array( + 'notification' => $view->translate('Notification'), + ); + } + + public function getUnfilteredQuery() + { + $db = $this->connection()->getConnection(); + $query = $db->select()->from( + array('n' => 'icinga_notification'), + array() + ); + + return $query; + } + + public function getBaseQuery() + { + return $this->getUnfilteredQuery(); + } +}