diff options
Diffstat (limited to 'library/Director/Web/Form/Element/Text.php')
-rw-r--r-- | library/Director/Web/Form/Element/Text.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/library/Director/Web/Form/Element/Text.php b/library/Director/Web/Form/Element/Text.php new file mode 100644 index 0000000..eeb36f1 --- /dev/null +++ b/library/Director/Web/Form/Element/Text.php @@ -0,0 +1,16 @@ +<?php + +namespace Icinga\Module\Director\Web\Form\Element; + +use Zend_Form_Element_Text as ZfText; + +class Text extends ZfText +{ + public function setValue($value) + { + if (\is_array($value)) { + $value = \json_encode($value); + } + return parent::setValue((string) $value); + } +} |