zucchi / doctrine
Zucchi Extensions for Doctrine
Installs: 946
Dependents: 4
Suggesters: 0
Security: 0
Stars: 6
Watchers: 3
Forks: 3
Open Issues: 0
pkg:composer/zucchi/doctrine
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;