icingaweb2-module-director/application/tables/IcingaTimePeriodTable.php

44 lines
976 B
PHP
Raw Normal View History

<?php
namespace Icinga\Module\Director\Tables;
use Icinga\Module\Director\Web\Table\QuickTable;
2015-06-09 10:35:02 +02:00
class IcingaTimePeriodTable extends QuickTable
{
protected $searchColumns = array(
'timeperiod',
);
public function getColumns()
{
return array(
'id' => 't.id',
'timeperiod' => 't.object_name',
'display_name' => 't.display_name',
);
}
protected function getActionUrl($row)
{
2015-07-02 14:31:35 +02:00
return $this->url('director/timeperiod', array('name' => $row->timeperiod));
}
public function getTitles()
{
$view = $this->view();
return array(
'timeperiod' => $view->translate('Timeperiod'),
'display_name' => $view->translate('Display Name'),
);
}
public function getBaseQuery()
{
return $this->db()->select()->from(
array('t' => 'icinga_timeperiod'),
array()
);
}
}