mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-23 02:28:44 +02:00
N°8772 - Form dependencies manager implementation - WIP
This commit is contained in:
@@ -3,17 +3,17 @@
|
||||
namespace Combodo\iTop\Forms\Block;
|
||||
|
||||
use Symfony\Component\Form\Extension\Core\Type\FormType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Form\FormInterface;
|
||||
|
||||
class FormBlock extends AbstractFormBlock
|
||||
{
|
||||
public const OUTPUT_VALUE = 'value';
|
||||
|
||||
public function __construct(string $sName, array $aOptions = [])
|
||||
{
|
||||
$aOptions['form_block'] = $this;
|
||||
parent::__construct($sName, $aOptions);
|
||||
}
|
||||
|
||||
|
||||
public function GetFormType(): string
|
||||
{
|
||||
return FormType::class;
|
||||
@@ -25,14 +25,6 @@ class FormBlock extends AbstractFormBlock
|
||||
|
||||
public function InitOutputs(): void
|
||||
{
|
||||
}
|
||||
|
||||
public function Build(FormBuilderInterface $oBuilder): FormInterface
|
||||
{
|
||||
foreach ($this->GetSubFormBlocks() as $oSubForm) {
|
||||
$oBuilder->add($oSubForm->GetName(), $oSubForm->GetFormType(), $oSubForm->GetOptions());
|
||||
}
|
||||
|
||||
return $oBuilder->getForm();
|
||||
$this->AddOutput(new FormOutput(self::OUTPUT_VALUE, 'string'));
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user