Created
May 13, 2011 01:52
-
-
Save comfuture/969832 to your computer and use it in GitHub Desktop.
article class that contains orm and form annotations
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
<?php | |
/** | |
* @Entity | |
* @Form(method="POST") | |
*/ | |
class Article | |
{ | |
/** @Id @GeneratedValue @Column(type="integer") */ | |
private $id; | |
/** | |
* @ManyToOne(targetEntity="User", reversedBy="articles") | |
* @FormItem(type="hidden") | |
*/ | |
private $user; | |
/** @Column(type="string", length=255) */ | |
private $title; | |
/** @Column(type="text") */ | |
private $content; | |
/** | |
* @Column(type="string", length=1) | |
* @FormItem(type="radio", options={ | |
* {"text"="YES", "value"="Y"}, | |
* {"text"="NO" , "value"="N"} | |
* }) | |
*/ | |
private $isPublic; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment