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