'y', 'uncheckedValue' => 'n', ); public function getDecoration() { return $this->_decoration; } public function setDecoration($name) { if (!in_array($name, array('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', array('placement' => 'APPEND')) ->addDecorator('Errors') ->addDecorator('Description', array('tag' => 'p', 'class' => 'description')) ->addDecorator('DtDdWrapper', array('tag' => 'dd', 'id' => $this->getName() . '-element')); } else if ($this->_decoration == 'default') { $this->clearDecorators(); $this->addDecorator('ViewHelper') ->addDecorator('Errors') ->addDecorator('Description', array('tag' => 'p', 'class' => 'description')) ->addDecorator('HtmlTag', array('tag' => 'dd', 'id' => $this->getName() . '-element')) ->addDecorator('Label', array('tag' => 'dt')); } else { throw new Qs_Form_Element_Exception('Unsupported decoration type: ' . $this->_decoration); } } }