https://github.com/webchemistry/form-serializer
[Deprecated]
https://github.com/webchemistry/form-serializer
Last synced: 4 months ago
JSON representation
[Deprecated]
- Host: GitHub
- URL: https://github.com/webchemistry/form-serializer
- Owner: WebChemistry
- Created: 2020-12-30T23:12:55.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-09-15T10:10:09.000Z (almost 4 years ago)
- Last Synced: 2025-01-19T06:11:22.878Z (6 months ago)
- Language: PHP
- Homepage:
- Size: 13.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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;
}}
```