public function build(array $configuration, $presetName)
    {
        $formDefaults = $this->getPresetConfiguration($presetName);

        $form = isset($configuration['type']) ?
            new FormDefinition($configuration['identifier'], $formDefaults, $configuration['type']) :
            new FormDefinition($configuration['identifier'], $formDefaults);

        if (isset($configuration['renderables'])) {
            foreach ($configuration['renderables'] as $pageConfiguration) {
                $this->addNestedRenderable($pageConfiguration, $form);
            }
        }

        unset($configuration['renderables']);
        unset($configuration['type']);
        unset($configuration['identifier']);
        unset($configuration['label']);
        $form->setOptions($configuration);

        $this->triggerFormBuildingFinished($form);

        return $form;
    }
public function build(array $configuration, $presetName)
    {
        $formDefaults = $this->getPresetConfiguration($presetName);

        $form = isset($configuration['type']) ?
            new FormDefinition($configuration['identifier'], $formDefaults, $configuration['type']) :
            new FormDefinition($configuration['identifier'], $formDefaults);

        if (isset($configuration['renderables'])) {
            foreach ($configuration['renderables'] as $pageConfiguration) {
                $this->addNestedRenderable($pageConfiguration, $form);
            }
        }

        unset($configuration['renderables']);
        unset($configuration['type']);
        unset($configuration['identifier']);
        unset($configuration['label']);
        $form->setOptions($configuration);

        $this->triggerFormBuildingFinished($form);

        return $form;
    }
public function build ( array $ configuration , $ presetName ) { $ formDefaults = $ this -> getPresetConfiguration ( $ presetName ) ; $ form = isset ( $ configuration [ 'type' ] ) ? new FormDefinition ( $ configuration [ 'identifier' ] , $ formDefaults , $ configuration [ 'type' ] ) : new FormDefinition ( $ configuration [ 'identifier' ] , $ formDefaults ) ; if ( isset ( $ configuration [ 'renderables' ] ) ) { foreach ( $ configuration [ 'renderables' ] as $ pageConfiguration ) { $ this -> addNestedRenderable ( $ pageConfiguration , $ form ) ; } } unset ( $ configuration [ 'renderables' ] ) ; unset ( $ configuration [ 'type' ] ) ; unset ( $ configuration [ 'identifier' ] ) ; unset ( $ configuration [ 'label' ] ) ; $ form -> setOptions ( $ configuration ) ; $ this -> triggerFormBuildingFinished ( $ form ) ; return $ form ; }
Build a form definition, depending on some configuration and a "Preset Name".

@param array $configuration
@param string $presetName
@return \Neos\Form\Core\Model\FormDefinition
Build a form definition depending on some configuration and a Preset Name .