mirror of
https://github.com/Icinga/icingaweb2-module-director.git
synced 2025-08-14 06:18:10 +02:00
parent
7c6a10013f
commit
c1e80afff4
@ -28,14 +28,17 @@ class Boolean extends ZfSelect
|
||||
return null;
|
||||
}
|
||||
|
||||
public function isValid($value, $context = null)
|
||||
protected function _filterValue(&$value, &$key)
|
||||
{
|
||||
return $value === 'y'
|
||||
|| $value === 'n'
|
||||
|| $value === null
|
||||
|| $value === ''
|
||||
|| $value === true
|
||||
|| $value === false;
|
||||
if ($value === true) {
|
||||
$value = 'y';
|
||||
} elseif ($value === false) {
|
||||
$value = 'n';
|
||||
} elseif ($value === '') {
|
||||
$value = null;
|
||||
}
|
||||
|
||||
parent::_filterValue($value, $key);
|
||||
}
|
||||
|
||||
public function setValue($value)
|
||||
|
Loading…
x
Reference in New Issue
Block a user