mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-27 07:44:04 +02:00
Data\Filter: add setters for all properties
To keep our filter editor simple we want our filters to handle also operations replacing themselves.
This commit is contained in:
parent
97f88bf636
commit
18e49f6b9a
@ -78,6 +78,14 @@ abstract class FilterChain extends Filter
|
|||||||
return $this->operatorName;
|
return $this->operatorName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setOperatorName($name)
|
||||||
|
{
|
||||||
|
if ($name !== $this->operatorName) {
|
||||||
|
return Filter::chain($name, $this->filters);
|
||||||
|
}
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function getOperatorSymbol()
|
public function getOperatorSymbol()
|
||||||
{
|
{
|
||||||
return $this->operatorSymbol;
|
return $this->operatorSymbol;
|
||||||
|
@ -41,6 +41,20 @@ class FilterExpression extends Filter
|
|||||||
return $this->expression;
|
return $this->expression;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setExpression($expression)
|
||||||
|
{
|
||||||
|
$this->expression = $expression;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function setSign($sign)
|
||||||
|
{
|
||||||
|
if ($sign !== $this->sign) {
|
||||||
|
return Filter::expression($this->column, $sign, $this->expression);
|
||||||
|
}
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
public function __toString()
|
public function __toString()
|
||||||
{
|
{
|
||||||
$expression = is_array($this->expression) ?
|
$expression = is_array($this->expression) ?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user