webchemistry/form-serializer

There is no license information available for the latest version (v1.3.0) of this package.

v1.3.0 2021-09-15 10:09 UTC

This package is auto-updated.

Last update: 2024-12-15 17:21:11 UTC


README

use WebChemistry\FormSerializer\FormSerializerAwareInterface;
use WebChemistry\FormSerializer\TFormSerializer;

class Form extends NetteForm implements FormSerializerAwareInterface {

	use TFormSerializer;

}
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;
	}

}