summaryrefslogtreecommitdiffstats
path: root/library/Director/Dashboard/Dashlet/ChoicesDashlet.php
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--library/Director/Dashboard/Dashlet/ChoicesDashlet.php41
1 files changed, 41 insertions, 0 deletions
diff --git a/library/Director/Dashboard/Dashlet/ChoicesDashlet.php b/library/Director/Dashboard/Dashlet/ChoicesDashlet.php
new file mode 100644
index 0000000..efdbba5
--- /dev/null
+++ b/library/Director/Dashboard/Dashlet/ChoicesDashlet.php
@@ -0,0 +1,41 @@
+<?php
+
+namespace Icinga\Module\Director\Dashboard\Dashlet;
+
+abstract class ChoicesDashlet extends Dashlet
+{
+ protected $icon = 'flapping';
+
+ public function getTitle()
+ {
+ return $this->translate('Choices');
+ }
+
+ public function getSummary()
+ {
+ return $this->translate(
+ 'Combine multiple templates into meaningful Choices, making life'
+ . ' easier for your users'
+ );
+ }
+
+ protected function getType()
+ {
+ return strtolower(substr(
+ substr(get_called_class(), strlen(__NAMESPACE__) + 1),
+ 0,
+ - strlen('ChoicesDashlet')
+ ));
+ }
+
+ public function getUrl()
+ {
+
+ return 'director/templatechoices/' . $this->getType();
+ }
+
+ public function listRequiredPermissions()
+ {
+ return array('director/admin');
+ }
+}