summaryrefslogtreecommitdiffstats
path: root/application/views/helpers/ColumnHeader.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:18:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-14 13:18:42 +0000
commit9f39660f50004ca7c49ea171e2a6f199487cd667 (patch)
tree4a77cd3e323c37b0e5b3d7578b9718cdf1a89262 /application/views/helpers/ColumnHeader.php
parentInitial commit. (diff)
downloadicingaweb2-module-eventdb-upstream.tar.xz
icingaweb2-module-eventdb-upstream.zip
Adding upstream version 1.3.0.upstream/1.3.0upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'application/views/helpers/ColumnHeader.php')
-rw-r--r--application/views/helpers/ColumnHeader.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/application/views/helpers/ColumnHeader.php b/application/views/helpers/ColumnHeader.php
new file mode 100644
index 0000000..3c7f7cd
--- /dev/null
+++ b/application/views/helpers/ColumnHeader.php
@@ -0,0 +1,17 @@
+<?php
+/* Icinga Web 2 | (c) 2016 Icinga Development Team | GPLv2+ */
+
+class Zend_View_Helper_ColumnHeader extends Zend_View_Helper_Abstract
+{
+ public function columnHeader($columnHeader, $classes = array(), $plain = false)
+ {
+ $header = $this->view->columnConfig->get($columnHeader, 'label', ucwords(str_replace('_', ' ', $columnHeader)));
+ if ($plain) {
+ return $header;
+ }
+ $htm = '<th classes="' . implode(' ', $classes) . '">';
+ $htm .= $this->view->escape($header);
+ $htm .= '</th>';
+ return $htm;
+ }
+}