mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-09-26 03:09:11 +02:00
IcingaHostServiceTable: allow to override title
This commit is contained in:
parent
a79883af3e
commit
c521f1439a
@ -7,6 +7,8 @@ use Icinga\Module\Director\Web\Table\QuickTable;
|
|||||||
|
|
||||||
class IcingaHostServiceTable extends QuickTable
|
class IcingaHostServiceTable extends QuickTable
|
||||||
{
|
{
|
||||||
|
protected $title;
|
||||||
|
|
||||||
protected $host;
|
protected $host;
|
||||||
|
|
||||||
protected $searchColumns = array(
|
protected $searchColumns = array(
|
||||||
@ -24,6 +26,12 @@ class IcingaHostServiceTable extends QuickTable
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setTitle($title)
|
||||||
|
{
|
||||||
|
$this->title = $title;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function setHost(IcingaHost $host)
|
public function setHost(IcingaHost $host)
|
||||||
{
|
{
|
||||||
$this->host = $host;
|
$this->host = $host;
|
||||||
@ -48,7 +56,7 @@ class IcingaHostServiceTable extends QuickTable
|
|||||||
{
|
{
|
||||||
$view = $this->view();
|
$view = $this->view();
|
||||||
return array(
|
return array(
|
||||||
'service' => $view->translate('Servicename'),
|
'service' => $this->title ?: $view->translate('Servicename'),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user