2014-09-26 16:19:44 +02:00
|
|
|
<?php
|
2015-02-04 10:46:36 +01:00
|
|
|
/* Icinga Web 2 | (c) 2013-2015 Icinga Development Team | GPLv2+ */
|
2014-09-26 16:19:44 +02:00
|
|
|
|
|
|
|
namespace Icinga\Web\Form\Element;
|
|
|
|
|
2014-11-14 10:15:11 +01:00
|
|
|
use Icinga\Web\Form\FormElement;
|
2014-09-26 16:19:44 +02:00
|
|
|
|
|
|
|
/**
|
2014-10-01 08:18:34 +02:00
|
|
|
* A note
|
2014-09-26 16:19:44 +02:00
|
|
|
*/
|
2014-11-14 10:15:11 +01:00
|
|
|
class Note extends FormElement
|
2014-09-26 16:19:44 +02:00
|
|
|
{
|
|
|
|
/**
|
2014-10-01 08:18:34 +02:00
|
|
|
* Form view helper to use for rendering
|
2014-09-26 16:19:44 +02:00
|
|
|
*
|
|
|
|
* @var string
|
|
|
|
*/
|
|
|
|
public $helper = 'formNote';
|
|
|
|
|
|
|
|
/**
|
2014-10-01 08:18:34 +02:00
|
|
|
* Ignore element when retrieving values at form level
|
2014-09-26 16:19:44 +02:00
|
|
|
*
|
2014-10-01 08:18:34 +02:00
|
|
|
* @var bool
|
|
|
|
*/
|
|
|
|
protected $_ignore = true;
|
|
|
|
|
2014-10-06 10:21:02 +02:00
|
|
|
/**
|
|
|
|
* (non-PHPDoc)
|
|
|
|
* @see Zend_Form_Element::init() For the method documentation.
|
|
|
|
*/
|
|
|
|
public function init()
|
|
|
|
{
|
2014-10-13 09:41:36 +02:00
|
|
|
if (count($this->getDecorators()) === 0) {
|
|
|
|
$this->setDecorators(array(
|
|
|
|
'ViewHelper',
|
|
|
|
array(
|
|
|
|
'HtmlTag',
|
|
|
|
array('tag' => 'p')
|
|
|
|
)
|
|
|
|
));
|
|
|
|
}
|
2014-10-06 10:21:02 +02:00
|
|
|
}
|
|
|
|
|
2014-10-01 08:18:34 +02:00
|
|
|
/**
|
|
|
|
* Validate element value (pseudo)
|
|
|
|
*
|
|
|
|
* @param mixed $value Ignored
|
|
|
|
*
|
|
|
|
* @return bool Always true
|
2014-09-26 16:19:44 +02:00
|
|
|
*/
|
|
|
|
public function isValid($value)
|
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|