diff options
Diffstat (limited to '')
-rw-r--r-- | library/Director/Web/Form/QuickSubForm.php | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/library/Director/Web/Form/QuickSubForm.php b/library/Director/Web/Form/QuickSubForm.php new file mode 100644 index 0000000..2487d35 --- /dev/null +++ b/library/Director/Web/Form/QuickSubForm.php @@ -0,0 +1,36 @@ +<?php + +namespace Icinga\Module\Director\Web\Form; + +abstract class QuickSubForm extends QuickBaseForm +{ + /** + * Whether or not form elements are members of an array + * @codingStandardsIgnoreStart + * @var bool + */ + protected $_isArray = true; + // @codingStandardsIgnoreEnd + + /** + * Load the default decorators + * + * @return $this + */ + public function loadDefaultDecorators() + { + if ($this->loadDefaultDecoratorsIsDisabled()) { + return $this; + } + + $decorators = $this->getDecorators(); + if (empty($decorators)) { + $this->addDecorator('FormElements') + ->addDecorator('HtmlTag', array('tag' => 'dl')) + ->addDecorator('Fieldset') + ->addDecorator('DtDdWrapper'); + } + + return $this; + } +} |