CustomVariableArray: implement get(Db)Value()

This commit is contained in:
Thomas Gelf 2015-08-28 18:26:51 +02:00
parent a16fd24cac
commit e912b566a2
1 changed files with 21 additions and 2 deletions

View File

@ -12,8 +12,27 @@ class CustomVariableArray extends CustomVariable
return false;
}
// TODO: better var handlig, fix this
return $var->value === $this->value;
return $var->getDbValue() === $this->getDbValue();
}
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)