diff options
Diffstat (limited to '')
-rw-r--r-- | library/Director/Web/Form/Element/InstanceSummary.php | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/library/Director/Web/Form/Element/InstanceSummary.php b/library/Director/Web/Form/Element/InstanceSummary.php new file mode 100644 index 0000000..722ad26 --- /dev/null +++ b/library/Director/Web/Form/Element/InstanceSummary.php @@ -0,0 +1,51 @@ +<?php + +namespace Icinga\Module\Director\Web\Form\Element; + +use gipfl\IcingaWeb2\Link; +use ipl\Html\Html; + +/** + * Used by the + */ +class InstanceSummary extends FormElement +{ + public $helper = 'formSimpleNote'; + + /** + * Always ignore this element + * @codingStandardsIgnoreStart + * + * @var boolean + */ + protected $_ignore = true; + // @codingStandardsIgnoreEnd + + private $instances; + + /** @var array will be set via options */ + protected $linkParams; + + public function setValue($value) + { + $this->instances = $value; + return $this; + } + + public function getValue() + { + return Html::tag('span', [ + Html::tag('italic', 'empty'), + ' ', + Link::create('Manage Instances', 'director/data/dictionary', $this->linkParams, [ + 'data-base-target' => '_next', + 'class' => 'icon-forward' + ]) + ]); + } + + public function isValid($value, $context = null) + { + return true; + } +} |