2016-03-05 19:00:50 -05:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
namespace Icinga\Module\Director\Web\Form\Element;
|
|
|
|
|
|
2022-07-18 06:14:20 -04:00
|
|
|
use Icinga\Module\Director\PlainObjectRenderer;
|
|
|
|
|
use ipl\Html\ValidHtml;
|
|
|
|
|
|
2016-03-05 19:00:50 -05:00
|
|
|
class SimpleNote extends FormElement
|
|
|
|
|
{
|
|
|
|
|
public $helper = 'formSimpleNote';
|
2016-03-08 16:30:12 -05:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Always ignore this element
|
|
|
|
|
* @codingStandardsIgnoreStart
|
|
|
|
|
*
|
|
|
|
|
* @var boolean
|
|
|
|
|
*/
|
2016-03-05 19:00:50 -05:00
|
|
|
protected $_ignore = true;
|
2016-03-08 16:30:12 -05:00
|
|
|
// @codingStandardsIgnoreEnd
|
2024-10-22 08:31:14 -04:00
|
|
|
|
2016-03-05 19:00:50 -05:00
|
|
|
public function isValid($value, $context = null)
|
|
|
|
|
{
|
|
|
|
|
return true;
|
|
|
|
|
}
|
2022-07-18 06:14:20 -04:00
|
|
|
|
|
|
|
|
public function setValue($value)
|
|
|
|
|
{
|
|
|
|
|
if (is_object($value) && ! $value instanceof ValidHtml) {
|
|
|
|
|
$value = 'Unexpected object: ' . PlainObjectRenderer::render($value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return parent::setValue($value);
|
|
|
|
|
}
|
2016-03-05 19:00:50 -05:00
|
|
|
}
|