src/Forms/FormFactory.php
public function make($dataClass = null, $options = [], $builder = FormBuilder::class): FormBuilderInterface
    {
        $dataMapperManager = new DataMapperManager(PropertyAccess::createPropertyAccessor());

        $form = new Form(
            $dataClass,
            new FieldsRepository(),
            $this->validation,
            $this->viewer,
            $dataMapperManager
        );
        $form->setManager($this->manager);
        $form->setResourceTransformerFactory($this->factory);
        $form->setAttributes($this->attributes);
        $form->setOptions($options);

        $this->builder = new $builder($form, $dataMapperManager, $dataClass);

        return $this->builder;
    }
public function make($dataClass = null, $options = [], $builder = FormBuilder::class): FormBuilderInterface
    {
        $dataMapperManager = new DataMapperManager(PropertyAccess::createPropertyAccessor());

        $form = new Form(
            $dataClass,
            new FieldsRepository(),
            $this->validation,
            $this->viewer,
            $dataMapperManager
        );
        $form->setManager($this->manager);
        $form->setResourceTransformerFactory($this->factory);
        $form->setAttributes($this->attributes);
        $form->setOptions($options);

        $this->builder = new $builder($form, $dataMapperManager, $dataClass);

        return $this->builder;
    }
public function make ( $ dataClass = null , $ options = [ ] , $ builder = FormBuilder :: class ) : FormBuilderInterface { $ dataMapperManager = new DataMapperManager ( PropertyAccess :: createPropertyAccessor ( ) ) ; $ form = new Form ( $ dataClass , new FieldsRepository ( ) , $ this -> validation , $ this -> viewer , $ dataMapperManager ) ; $ form -> setManager ( $ this -> manager ) ; $ form -> setResourceTransformerFactory ( $ this -> factory ) ; $ form -> setAttributes ( $ this -> attributes ) ; $ form -> setOptions ( $ options ) ; $ this -> builder = new $ builder ( $ form , $ dataMapperManager , $ dataClass ) ; return $ this -> builder ; }
Create a FormBuilderInterface instance.

@param mixed  $dataClass Data object (DTO).
@param array  $options
@param string $builder   A FieldBuilderInterface class.

@return FormBuilderInterface
Create a FormBuilderInterface instance .