Inheritance: implements FluidTYPO3\Flux\Form\FormInterface
コード例 #1
0
 /**
  * @param string $type
  * @param string $name
  * @param string $label
  * @return WizardInterface
  */
 public function createWizard($type, $name, $label = NULL)
 {
     $wizard = parent::createWizard($type, $name, $label);
     $this->add($wizard);
     return $wizard;
 }
コード例 #2
0
ファイル: AbstractFormField.php プロジェクト: JostBaron/flux
 /**
  * @param array $structure
  * @return ContainerInterface
  */
 public function modify(array $structure)
 {
     if (TRUE === isset($structure['wizards'])) {
         foreach ((array) $structure['wizards'] as $index => $wizardData) {
             $wizardName = TRUE === isset($wizardData['name']) ? $wizardData['name'] : $index;
             // check if field already exists - if it does, modify it. If it does not, create it.
             if (TRUE === $this->has($wizardName)) {
                 $field = $this->get($wizardName);
             } else {
                 $wizardType = TRUE === isset($wizardData['type']) ? $wizardData['type'] : 'None';
                 $field = $this->createWizard($wizardType, $wizardName);
             }
             $field->modify($wizardData);
         }
     }
     return parent::modify($structure);
 }