icingaweb2-module-director/library/Director/Web/Form/Element/SimpleNote.php

35 lines
726 B
PHP
Raw Permalink Normal View History

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