2015-07-02 14:13:42 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace Icinga\Module\Director\Tables;
|
|
|
|
|
|
|
|
use Icinga\Module\Director\Web\Table\QuickTable;
|
|
|
|
|
|
|
|
class DatalistTable extends QuickTable
|
|
|
|
{
|
2015-07-29 15:30:10 +02:00
|
|
|
protected $searchColumns = array(
|
|
|
|
'list_name',
|
|
|
|
);
|
|
|
|
|
2015-07-02 14:13:42 +02:00
|
|
|
public function getColumns()
|
|
|
|
{
|
|
|
|
return array(
|
|
|
|
'id' => 'l.id',
|
|
|
|
'list_name' => 'l.list_name',
|
|
|
|
'owner' => 'l.owner',
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
protected function getActionUrl($row)
|
|
|
|
{
|
2015-07-22 13:41:13 +02:00
|
|
|
return $this->url('director/list/datalistentry', array('list_id' => $row->id));
|
2015-07-02 14:13:42 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
public function getTitles()
|
|
|
|
{
|
|
|
|
$view = $this->view();
|
|
|
|
return array(
|
|
|
|
'list_name' => $view->translate('List name'),
|
|
|
|
'owner' => $view->translate('Owner'),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
2015-07-23 16:19:22 +02:00
|
|
|
public function getBaseQuery()
|
2015-07-02 14:13:42 +02:00
|
|
|
{
|
|
|
|
$db = $this->connection()->getConnection();
|
|
|
|
|
|
|
|
$query = $db->select()->from(
|
|
|
|
array('l' => 'director_datalist'),
|
2015-07-23 16:19:22 +02:00
|
|
|
array()
|
2015-07-02 14:13:42 +02:00
|
|
|
)->order('list_name ASC');
|
|
|
|
|
2015-07-23 16:19:22 +02:00
|
|
|
return $query;
|
2015-07-02 14:13:42 +02:00
|
|
|
}
|
|
|
|
}
|