This week only. Pastebin PRO Accounts Christmas Special! Don't miss out!Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Nov 15th, 2012  |  syntax: PHP  |  size: 1.05 KB  |  views: 54  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2. use \Doctrine\ORM\Mapping as ORM;
  3. use \xxx\Doctrine\Annotation\Entity as re;
  4. use \xxx\Doctrine\Annotation\Forms as rf;
  5. use \Doctrine\Common\Collections;
  6.  
  7. /**
  8.  * @ORM\Entity
  9.  */
  10. class EventPicture extends \Picture
  11. {
  12.  
  13.     /**
  14.      * @ORM\ManyToOne(targetEntity="Event", inversedBy="eventPicture")
  15.      * @ORM\JoinColumn(name="FK_Event", referencedColumnName="id")
  16.      */
  17.     protected $event;
  18.  
  19. }
  20. ?>
  21.  
  22. <?php
  23. use \Doctrine\ORM\Mapping as ORM;
  24. use \xxx\Doctrine\Annotation\Entity as re;
  25. use \xxx\Doctrine\Annotation\Forms as rf;
  26. use \Doctrine\Common\Collections;
  27.  
  28. /** @ORM\MappedSuperclass */
  29. class Picture extends \xxx\Doctrine\Entity\BaseEntity
  30. {
  31.  
  32.     /**
  33.      * @ORM\Id
  34.      * @ORM\Column(type="integer")
  35.      * @ORM\GeneratedValue(strategy="IDENTITY")
  36.      * @var type
  37.      */
  38.     protected $id;
  39.  
  40.     /**
  41.      * @ORM\Column(type="string",unique=true, nullable=false)
  42.      *  @rf\FileUpload(fileSize="php",uploadType="local",fieldName="link",formControl="FileUploadField",image=true)
  43.      *
  44.      */
  45.     protected $link;
  46.  
  47. }
  48. ?>
clone this paste RAW Paste Data