2015-06-03 13:02:44 +02:00
|
|
|
<?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
|
2015-06-03 13:02:44 +02:00
|
|
|
{
|
2015-07-29 15:30:10 +02:00
|
|
|
protected $searchColumns = array(
|
|
|
|
'timeperiod',
|
|
|
|
);
|
|
|
|
|
2015-06-03 13:02:44 +02:00
|
|
|
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));
|
2015-06-03 13:02:44 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getTitles()
|
|
|
|
{
|
|
|
|
$view = $this->view();
|
|
|
|
return array(
|
|
|
|
'timeperiod' => $view->translate('Timeperiod'),
|
|
|
|
'display_name' => $view->translate('Display Name'),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2015-07-23 16:19:22 +02:00
|
|
|
public function getBaseQuery()
|
2015-06-03 13:02:44 +02:00
|
|
|
{
|
2016-11-02 14:27:23 +01:00
|
|
|
return $this->db()->select()->from(
|
2015-06-03 13:02:44 +02:00
|
|
|
array('t' => 'icinga_timeperiod'),
|
2015-07-23 16:19:22 +02:00
|
|
|
array()
|
2015-06-03 13:02:44 +02:00
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|