shivoham / value-object-form-bundle
There is no license information available for the latest version (dev-master) of this package.
Package info
github.com/Shivoham/value-object-form-bundle
Type:symfony-bundle
pkg:composer/shivoham/value-object-form-bundle
dev-master
2016-06-12 15:35 UTC
Requires
- symfony/config: ^3.1
- symfony/dependency-injection: ^3.1
- symfony/form: ^3.1
- symfony/http-kernel: ^3.1
This package is not auto-updated.
Last update: 2026-03-05 00:57:42 UTC
README
Usage
The Kebab model
class Kebab { private $name; public function getName() { return $this->name; } public function getIdentity() { return [ 'name' => $this->name, ]; } public function setIdentity(Identity $identity) { $this->name = $identity->name; // ... } }
The "POPO" Kebab identifier
class Identity { public $name; // ... }
The Kebab identifier form
use AppBundle\Form\Type\KebabIdentifierType; use AppBundle\Entity\Kebab; use AppBundle\Entity\Kebab\Identity; $this->createForm(KebabIdentifierType::CLASS, $kebab, [ 'object_accessor' => 'getIdentity', 'object_mutator' => 'setIdentity', 'value_object_class' => Identity::class ]);