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