Advertisement
Guest User

Untitled

a guest
Feb 14th, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.57 KB | None | 0 0
  1. <?php
  2. // src/OC/PlatformBundle/Entity/Advert.php
  3.  
  4. namespace OC\PlatformBundle\Entity;
  5.  
  6. use Doctrine\ORM\Mapping as ORM;
  7.  
  8. /**
  9.  * @ORM\Entity(repositoryClass="OC\PlatformBundle\Entity\AdvertRepository")
  10.  */
  11. class Advert
  12. {
  13.   /**
  14.    * @ORM\OneToOne(targetEntity="OC\PlatformBundle\Entity\Image", cascade={"persist"})
  15.    */
  16.   private $image;
  17.  
  18.   // Vos autres attributs…
  19.    
  20.   public function setImage(Image $image = null)
  21.   {
  22.     $this->image = $image;
  23.   }
  24.  
  25.   public function getImage()
  26.   {
  27.     return $this->image;
  28.   }
  29.  
  30.   // Vos autres getters/setters…
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement