mirror of
https://github.com/Combodo/iTop.git
synced 2026-04-24 02:58:43 +02:00
N°8772 - Refactor
This commit is contained in:
@@ -72,10 +72,6 @@ class CollectionBlock extends AbstractTypeFormBlock
|
||||
$sBlockEntryOptions = $this->GetOption('block_entry_options');
|
||||
$this->oPrototypeBlock = new ($sBlockEntryType)('prototype', $sBlockEntryOptions);
|
||||
|
||||
// $this->HandleBlockDependencies();
|
||||
// $this->oBlock->SetParent($this->GetParent());
|
||||
// $oBlock->DependsOn('company', 'company', AbstractFormBlock::OUTPUT_VALUE);
|
||||
|
||||
$oOptionsRegister->SetOption('entry_type', $this->oPrototypeBlock->GetFormType());
|
||||
$oOptionsRegister->SetOption('entry_options', $this->oPrototypeBlock->GetOptions());
|
||||
}
|
||||
|
||||
@@ -9,10 +9,10 @@ namespace Combodo\iTop\Forms\Block\Base;
|
||||
use Combodo\iTop\Forms\Block\AbstractFormBlock;
|
||||
use Combodo\iTop\Forms\Block\AbstractTypeFormBlock;
|
||||
use Combodo\iTop\Forms\Block\FormBlockException;
|
||||
use Combodo\iTop\Forms\FormType\Base\FormType;
|
||||
use Combodo\iTop\Forms\Register\OptionsRegister;
|
||||
use Combodo\iTop\Forms\FormBuilder\DependencyMap;
|
||||
use Combodo\iTop\Forms\FormsException;
|
||||
use Combodo\iTop\Forms\FormType\Base\FormType;
|
||||
use Combodo\iTop\Forms\Register\OptionsRegister;
|
||||
use Exception;
|
||||
use ReflectionClass;
|
||||
use ReflectionException;
|
||||
@@ -43,8 +43,8 @@ class FormBlock extends AbstractTypeFormBlock
|
||||
// Build the form
|
||||
$this->BuildForm();
|
||||
}
|
||||
catch (Exception $ex) {
|
||||
throw new FormsException('Unable to construct demonstrator form.', 0, $ex);
|
||||
catch (Exception $e) {
|
||||
throw new FormBlockException('Unable to construct form', 0, $e);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -72,6 +72,7 @@ class FormBlock extends AbstractTypeFormBlock
|
||||
*
|
||||
* @return $this
|
||||
* @throws ReflectionException
|
||||
* @throws \Combodo\iTop\Forms\Block\FormBlockException
|
||||
*/
|
||||
public function Add(string $sName, string $sType, array $aSymfonyOptions, array $aOptions = []): AbstractFormBlock
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user