'y', 'uncheckedValue' => 'n', ]; public function getDecoration() { return $this->_decoration; } public function setDecoration($name) { if (!in_array($name, ['default', 'simple'])) { throw new Qs_Form_Element_Exception('Unsupported decoration type: ' . $name); } if ($name != $this->_decoration) { $this->_decoration = $name; $this->_decorate(); } } public function loadDefaultDecorators() { if ($this->loadDefaultDecoratorsIsDisabled()) { return; } $decorators = $this->getDecorators(); if (empty($decorators)) { $this->_decorate(); } } protected function _decorate() { if ($this->_decoration == 'simple') { $this->clearDecorators(); $this->addDecorator('ViewHelper') ->addDecorator('Label', ['placement' => 'APPEND']) ->addDecorator('Errors') ->addDecorator('Description', ['tag' => 'p', 'class' => 'description']) ->addDecorator('DtDdWrapper', ['tag' => 'dd', 'id' => $this->getName() . '-element']); } else if ($this->_decoration == 'default') { $this->clearDecorators(); $this->addDecorator('ViewHelper') ->addDecorator('Errors') ->addDecorator('Description', ['tag' => 'p', 'class' => 'description']) ->addDecorator('HtmlTag', ['tag' => 'dd', 'id' => $this->getName() . '-element']) ->addDecorator('Label', ['tag' => 'dt']); } else { throw new Qs_Form_Element_Exception('Unsupported decoration type: ' . $this->_decoration); } } }