File: ColumnHeader.php

package info (click to toggle)
icingaweb2-module-eventdb 1.3.0-9
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,040 kB
  • sloc: php: 2,044; sh: 105; javascript: 85; xml: 18; makefile: 16
file content (17 lines) | stat: -rw-r--r-- 577 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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;
    }
}