Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

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

[Deprecated]
https://github.com/webchemistry/form-serializer

Last synced: about 1 month ago
JSON representation

[Deprecated]

Awesome Lists containing this project

README

        

## Usage

```php
use WebChemistry\FormSerializer\FormSerializerAwareInterface;
use WebChemistry\FormSerializer\TFormSerializer;

class Form extends NetteForm implements FormSerializerAwareInterface {

use TFormSerializer;

}
```

```php

use Nette\Application\UI\Form;
use WebChemistry\FormSerializer\FormSerializerFactoryInterface;

class ArticleForm {

public function __construct(private FormSerializerFactoryInterface $formSerializerFactory) {}

public function create() {
$serializer = $this->formSerializerFactory->create($form = new Form(), Article::class);

return $form;
}

}

```