Note: Extend our FormElement class

This commit is contained in:
Eric Lippmann 2014-10-06 10:21:02 +02:00
parent 9be52a9148
commit a3409b166d

View File

@ -5,23 +5,13 @@
namespace Icinga\Web\Form\Element; namespace Icinga\Web\Form\Element;
use Zend_Form_Element; use Zend_Form_Element;
use Icinga\Web\Form;
/** /**
* A note * A note
*/ */
class Note extends Zend_Form_Element class Note extends Zend_Form_Element
{ {
/**
* Disable default decorators
*
* \Icinga\Web\Form sets default decorators for elements.
*
* @var bool
*
* @see \Icinga\Web\Form::__construct() For default element decorators.
*/
protected $_disableLoadDefaultDecorators = true;
/** /**
* Form view helper to use for rendering * Form view helper to use for rendering
* *
@ -36,6 +26,15 @@ class Note extends Zend_Form_Element
*/ */
protected $_ignore = true; protected $_ignore = true;
/**
* (non-PHPDoc)
* @see Zend_Form_Element::init() For the method documentation.
*/
public function init()
{
$this->setDecorators(Form::$defaultElementDecorators);
}
/** /**
* Validate element value (pseudo) * Validate element value (pseudo)
* *