mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 15:34:12 +01:00
78 lines
1.5 KiB
PHP
78 lines
1.5 KiB
PHP
<?php
|
|
/**
|
|
* @copyright Copyright (C) 2010-2020 Combodo SARL
|
|
* @license http://opensource.org/licenses/AGPL-3.0
|
|
*/
|
|
|
|
|
|
namespace Combodo\iTop\Application\UI\Base\Component\Input;
|
|
|
|
|
|
use Combodo\iTop\Application\UI\Base\UIBlock;
|
|
|
|
/**
|
|
* You might want to use a {@link \Combodo\iTop\Application\UI\Base\Component\Field\Field} component instead...
|
|
*
|
|
* @package Combodo\iTop\Application\UI\Base\Component\Input
|
|
*/
|
|
class InputWithLabel extends UIBlock
|
|
{
|
|
public const DEFAULT_HTML_TEMPLATE_REL_PATH = 'base/components/input/inputwithlabel';
|
|
|
|
/** @var string */
|
|
protected $sLabel;
|
|
/** @var \Combodo\iTop\Application\UI\Base\UIBlock */
|
|
protected $oInput;
|
|
|
|
/**
|
|
* @param string $sLabel
|
|
* @param \Combodo\iTop\Application\UI\Base\UIBlock $oInput
|
|
* @param string|null $sId
|
|
*/
|
|
public function __construct(string $sLabel, UIBlock $oInput, ?string $sId)
|
|
{
|
|
parent::__construct($sId);
|
|
$this->sLabel = $sLabel;
|
|
$this->oInput = $oInput;
|
|
}
|
|
|
|
/**
|
|
* @return UIBlock
|
|
*/
|
|
public function GetInput()
|
|
{
|
|
return $this->oInput;
|
|
}
|
|
|
|
/**
|
|
* @param \Combodo\iTop\Application\UI\Base\UIBlock $oInput
|
|
*
|
|
* @return $this
|
|
*/
|
|
public function SetInput(UIBlock $oInput)
|
|
{
|
|
$this->oInput = $oInput;
|
|
|
|
return $this;
|
|
}
|
|
|
|
|
|
/**
|
|
* @return string
|
|
*/
|
|
public function GetLabel(): string
|
|
{
|
|
return $this->sLabel;
|
|
}
|
|
|
|
/**
|
|
* @param string $sLabel
|
|
*
|
|
* @return InputWithLabel
|
|
*/
|
|
public function SetLabel(string $sLabel): InputWithLabel
|
|
{
|
|
$this->sLabel = $sLabel;
|
|
return $this;
|
|
}
|
|
} |