mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 18:48:51 +02:00
N°2847 - Form and Input WIP
This commit is contained in:
33
sources/application/UI/Component/Input/Select.php
Normal file
33
sources/application/UI/Component/Input/Select.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
/**
|
||||
* @copyright Copyright (C) 2010-2020 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
|
||||
namespace Combodo\iTop\Application\UI\Component\Input;
|
||||
|
||||
|
||||
class Select extends InputWithLabel
|
||||
{
|
||||
public const HTML_TEMPLATE_REL_PATH = 'components/input/Select';
|
||||
|
||||
/** @var array */
|
||||
protected $aOptions;
|
||||
|
||||
public function __construct(?string $sId = null)
|
||||
{
|
||||
parent::__construct($sId);
|
||||
$this->aOptions = [];
|
||||
}
|
||||
|
||||
public function AddOption(SelectOption $oOption)
|
||||
{
|
||||
$this->aOptions[$oOption->GetId()] = $oOption;
|
||||
}
|
||||
|
||||
public function GetSubBlocks()
|
||||
{
|
||||
return $this->aOptions;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user