mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-25 19:48:49 +02:00
N°8772 - dynamic form
This commit is contained in:
25
sources/Forms/IO/Converter/StringToAttributeConverter.php
Normal file
25
sources/Forms/IO/Converter/StringToAttributeConverter.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
/*
|
||||
* @copyright Copyright (C) 2010-2025 Combodo SARL
|
||||
* @license http://opensource.org/licenses/AGPL-3.0
|
||||
*/
|
||||
|
||||
namespace Combodo\iTop\Forms\IO\Converter;
|
||||
|
||||
use Combodo\iTop\Forms\IO\Format\AttributeIOFormat;
|
||||
|
||||
/**
|
||||
* String to attribute converter.
|
||||
*/
|
||||
class StringToAttributeConverter extends AbstractConverter
|
||||
{
|
||||
/** @inheritdoc */
|
||||
public function Convert(mixed $oData): ?AttributeIOFormat
|
||||
{
|
||||
if ($oData === null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return new AttributeIOFormat($oData);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user