mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-08-21 09:48:12 +02:00
44 lines
868 B
PHP
44 lines
868 B
PHP
<?php
|
|
|
|
/* Icinga Web 2 | (c) 2022 Icinga GmbH | GPLv2+ */
|
|
|
|
namespace Icinga\Web\Dashboard\ItemList;
|
|
|
|
use ipl\Html\Contract\FormElement;
|
|
use ipl\Html\HtmlElement;
|
|
|
|
class DashletListMultiSelect extends DashletListItem
|
|
{
|
|
/** @var FormElement */
|
|
protected $checkbox;
|
|
|
|
/**
|
|
* Set a checkbox to be applied to the dashlet to enable multiselect
|
|
*
|
|
* @param FormElement $checkbox
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function setCheckBox(FormElement $checkbox): self
|
|
{
|
|
$this->checkbox = $checkbox;
|
|
|
|
return $this;
|
|
}
|
|
|
|
protected function createLabel(): HtmlElement
|
|
{
|
|
$label = HtmlElement::create('label');
|
|
$label->addHtml($this->checkbox);
|
|
|
|
return $label;
|
|
}
|
|
|
|
protected function assemble()
|
|
{
|
|
parent::assemble();
|
|
|
|
$this->addWrapper($this->createLabel());
|
|
}
|
|
}
|