mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-30 09:14:09 +02:00
IcingaService: introduce assign_filter property
This commit is contained in:
parent
8f2b9fea07
commit
88a741a8d0
@ -2,6 +2,7 @@
|
||||
|
||||
namespace Icinga\Module\Director\Objects;
|
||||
|
||||
use Icinga\Data\Filter\Filter;
|
||||
use Icinga\Exception\ProgrammingError;
|
||||
use Icinga\Module\Director\IcingaConfig\IcingaConfig;
|
||||
use Icinga\Module\Director\IcingaConfig\IcingaConfigHelper as c;
|
||||
@ -41,6 +42,7 @@ class IcingaService extends IcingaObject
|
||||
'use_agent' => null,
|
||||
'apply_for' => null,
|
||||
'use_var_overrides' => null,
|
||||
'assign_filter' => null,
|
||||
);
|
||||
|
||||
protected $relations = array(
|
||||
@ -116,6 +118,19 @@ class IcingaService extends IcingaObject
|
||||
return $this->use_var_overrides === 'y';
|
||||
}
|
||||
|
||||
/**
|
||||
* @codingStandardsIgnoreStart
|
||||
*/
|
||||
public function setAssign_filter($filter)
|
||||
{
|
||||
// @codingStandardsIgnoreEnd
|
||||
if ($filter instanceof Filter) {
|
||||
$filter = $filter->toQueryString();
|
||||
}
|
||||
|
||||
return $this->reallySet('assign_filter', $filter);
|
||||
}
|
||||
|
||||
protected function setKey($key)
|
||||
{
|
||||
if (is_int($key)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user