Add ModelReflection Service as dependency injection + tests

This commit is contained in:
Eric Espie
2025-11-19 14:42:32 +01:00
parent 6678689b77
commit 65bd6d9fd0
18 changed files with 285 additions and 44 deletions

View File

@@ -8,6 +8,7 @@
namespace Combodo\iTop\Forms\IO;
use Combodo\iTop\Forms\Block\AbstractFormBlock;
use Combodo\iTop\Forms\IO\Format\AbstractIOFormat;
use Symfony\Component\Form\FormEvents;
/**
@@ -43,6 +44,9 @@ class AbstractFormIO
*/
public function __construct(string $sName, string $sType, AbstractFormBlock $oOwnerBlock)
{
if (!is_a($sType, AbstractIOFormat::class, true)) {
throw new FormBlockIOException('invalid form format type '.json_encode($sType).' given');
}
$this->sType = $sType;
$this->oOwnerBlock = $oOwnerBlock;
$this->SetName($sName);