Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/webchemistry/form-factory


https://github.com/webchemistry/form-factory

Last synced: about 2 months ago
JSON representation

Awesome Lists containing this project

README

        

## Usage

```neon
extensions:
form.factory: WebChemistry\FormFactory\DI\FormFactoryExtension

form.factory:
factory: FormFactory
```

```php
use WebChemistry\FormFactory\FormFactoryInterface;

class FormService
{

private FormFactoryInterface $formFactory;

public function __construct(FormFactoryInterface $formFactory)
{
$this->formFactory = $formFactory;
}

public function createForm()
{
$form = $this->formFactory->create();

// ...

return $form;
}

}
```