mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-07-31 01:34:12 +02:00
CustomVariableArray: implement get(Db)Value()
This commit is contained in:
parent
a16fd24cac
commit
e912b566a2
@ -12,8 +12,27 @@ class CustomVariableArray extends CustomVariable
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: better var handlig, fix this
|
return $var->getDbValue() === $this->getDbValue();
|
||||||
return $var->value === $this->value;
|
}
|
||||||
|
|
||||||
|
public function getValue()
|
||||||
|
{
|
||||||
|
$ret = array();
|
||||||
|
foreach ($this->value as $var) {
|
||||||
|
$ret[] = $var->getValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
return $ret;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDbValue()
|
||||||
|
{
|
||||||
|
return json_encode($this->getValue());
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getDbFormat()
|
||||||
|
{
|
||||||
|
return 'json';
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setValue($value)
|
public function setValue($value)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user