mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-30 14:08:46 +02:00
N°8771 - Add Symfony form component to iTop core
- WIP
This commit is contained in:
48
sources/Forms/Block/FormOutput.php
Normal file
48
sources/Forms/Block/FormOutput.php
Normal file
@@ -0,0 +1,48 @@
|
||||
<?php
|
||||
|
||||
namespace Combodo\iTop\Forms\Block;
|
||||
|
||||
use Combodo\iTop\Forms\Converter\AbstractConverter;
|
||||
|
||||
class FormOutput
|
||||
{
|
||||
private string $sName;
|
||||
|
||||
private string $sType;
|
||||
|
||||
private AbstractConverter $oConverter;
|
||||
|
||||
public function __construct(string $sName, string $sType, AbstractConverter $oConverter = null)
|
||||
{
|
||||
$this->sName = $sName;
|
||||
$this->sType = $sName;
|
||||
$this->oConverter = $oConverter;
|
||||
}
|
||||
|
||||
public function GetName(): string
|
||||
{
|
||||
return $this->sName;
|
||||
}
|
||||
|
||||
public function SetName(string $sName): void
|
||||
{
|
||||
$this->sName = $sName;
|
||||
}
|
||||
|
||||
public function GetType(): string
|
||||
{
|
||||
return $this->sType;
|
||||
}
|
||||
|
||||
public function SetType(string $sType): void
|
||||
{
|
||||
$this->sType = $sType;
|
||||
}
|
||||
|
||||
public function GetOutputValue(mixed $oData): mixed
|
||||
{
|
||||
$this->oConverter->Convert($oData);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user