Created
January 3, 2014 13:03
-
-
Save prendit/8237555 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @ORM\Entity | |
* @ORM\Table(name="eav_content_type") | |
* @Annotation\Name("eav_content_type") | |
* @Annotation\Object("PrenditCms\Core\Eav\Entity\EavContentType") | |
*/ | |
class EavContentType | |
{ | |
/** | |
* @var int $id | |
* | |
* @ORM\Id | |
* @ORM\Column(name="id", type="integer") | |
* @ORM\GeneratedValue(strategy="AUTO") | |
* @Annotation\Type("hidden") | |
* @Annotation\Required(false) | |
*/ | |
protected $id; | |
/** | |
* @var ArrayCollection $attributes | |
* | |
* @ORM\OneToMany(targetEntity="PrenditCms\Core\Eav\Entity\EavAttribute", mappedBy="contentType", cascade={"persist"}) | |
* @Annotation\ComposedObject({ | |
* "target_object" : "PrenditCms\Core\Eav\Entity\EavAttribute", | |
* "is_collection" : true, | |
* "options" : { | |
* "label" : "Attributes", | |
* "allow_add" : true, | |
* "allow_remove" : true, | |
* "should_create_template" : true | |
* } | |
* }) | |
*/ | |
protected $attributes; | |
} | |
/** | |
* @ORM\Entity | |
* @ORM\Table(name="eav_attribute") | |
* @Annotation\Name("eav_attribute") | |
* @Annotation\Object("PrenditCms\Core\Eav\Entity\EavAttribute") | |
*/ | |
class EavAttribute | |
{ | |
/** | |
* @var int $id | |
* | |
* @ORM\Id | |
* @ORM\Column(name="id", type="integer") | |
* @ORM\GeneratedValue(strategy="AUTO") | |
* @Annotation\Type("hidden") | |
* @Annotation\Required(false) | |
*/ | |
protected $id; | |
/** | |
* @var ArrayCollection $collection | |
* | |
* @ORM\OneToMany(targetEntity="PrenditCms\Core\Eav\Entity\EavAttributeCollection", mappedBy="attribute", cascade={"persist"}) | |
* @Annotation\ComposedObject({ | |
* "target_object" : "PrenditCms\Core\Eav\Entity\EavAttributeCollection", | |
* "is_collection" : true, | |
* "options" : { | |
* "label" : "Values", | |
* "allow_add" : true, | |
* "allow_remove" : true, | |
* "should_create_template" : true | |
* } | |
* }) | |
* @Annotation\Required(false) | |
*/ | |
protected $collection; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment