N°8771 - Add Symfony form component to iTop core

- IO debug
This commit is contained in:
Benjamin Dalsass
2025-10-28 15:33:28 +01:00
parent 5d335b39d2
commit 6952bfa978
25 changed files with 397 additions and 226 deletions

View File

@@ -10,8 +10,6 @@ use Combodo\iTop\Forms\Block\Base\ChoiceFormBlock;
use Combodo\iTop\Forms\Block\FormBlockException;
use Combodo\iTop\Forms\Block\IO\Format\AttributeIOFormat;
use Combodo\iTop\Forms\Block\IO\Format\ClassIOFormat;
use Combodo\iTop\Forms\Block\IO\FormInput;
use Combodo\iTop\Forms\Block\IO\FormOutput;
use Combodo\iTop\Forms\Block\IO\Converter\StringToAttributeConverter;
use Combodo\iTop\Forms\FormType\AttributeFormType;
use CoreException;
@@ -34,7 +32,7 @@ class AttributeChoiceFormBlock extends ChoiceFormBlock
public function InitOptions(): array
{
$aOptions = parent::InitOptions();
$aOptions['placeholder'] = 'Select an attribute...';
// $aOptions['placeholder'] = 'Select an attribute...';
return $aOptions;
}
@@ -42,14 +40,14 @@ class AttributeChoiceFormBlock extends ChoiceFormBlock
public function InitInputs(): void
{
parent::InitInputs();
$this->AddInput(new FormInput(self::INPUT_CLASS_NAME, ClassIOFormat::class));
$this->AddInput(self::INPUT_CLASS_NAME, ClassIOFormat::class);
}
/** @inheritdoc */
public function InitOutputs(): void
{
parent::InitOutputs();
$this->AddOutput(new FormOutput(self::OUTPUT_ATTRIBUTE, AttributeIOFormat::class, new StringToAttributeConverter()));
$this->AddOutput(self::OUTPUT_ATTRIBUTE, AttributeIOFormat::class, new StringToAttributeConverter());
}
/** @inheritdoc
@@ -79,9 +77,4 @@ class AttributeChoiceFormBlock extends ChoiceFormBlock
return $aOptions;
}
/** @inheritdoc */
public function GetFormType(): string
{
return AttributeFormType::class;
}
}