zucchi / doctrine
Zucchi Extensions for Doctrine
0.31
2016-02-09 10:24 UTC
Requires
- php: >=5.5.29
- doctrine/data-fixtures: 1.*
- doctrine/doctrine-mongo-odm-module: >=0.9
- doctrine/doctrine-orm-module: >=0.9
- gedmo/doctrine-extensions: 2.4.6
- zendframework/zend-eventmanager: 2.*
- zendframework/zend-form: 2.*
- zendframework/zend-mvc: 2.*
- zendframework/zend-servicemanager: 2.*
- zendframework/zend-stdlib: 2.*
- zucchi/zucchi: >=0.15
Requires (Dev)
- codeception/codeception: 2.1.2
README
Custom Extensions to Doctrine 2 ORM for use with Zucchi ZF2 Modules
Installation
From the root of your ZF2 Skeleton Application run
./composer.phar require zucchi/doctrine
Features
- Automatic registration of Gedmo DoctrineExtensions
- Timestampable Trait
- Override of Date/Time Mappings to use Zucchi\DateTime Extended classes
- Abstract Entity Class
- Abstract Service Class
- Custom DQL Regex Function
- EntityField View helper for handling output of different entity field types
- One To Many Form Population via Annotations
- EntityManagerAware Interface and Trait
OneToMany Annotation Example
This example comes directly from the ZucchiLayout Module
/** * @var PersistantCollection * @ORM\OneToMany(targetEntity="ZucchiLayout\Entity\Schedule", mappedBy="Layout") * @Form\Type("Zend\Form\Element\Collection") * @Form\Options({ * "label" : "Schedule", * "count" : 2, * "should_create_template" : true, * "allow_add" : true, * "allow_remove" : true, * "target_element" : { * "composedObject" : "ZucchiLayout\Entity\Schedule" * } * }) */ public $Schedule;