Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // src/OC/PlatformBundle/Entity/Advert.php
- namespace OC\PlatformBundle\Entity;
- use Doctrine\ORM\Mapping as ORM;
- /**
- * @ORM\Entity(repositoryClass="OC\PlatformBundle\Entity\AdvertRepository")
- */
- class Advert
- {
- /**
- * @ORM\OneToOne(targetEntity="OC\PlatformBundle\Entity\Image", cascade={"persist"})
- */
- private $image;
- // Vos autres attributs…
- public function setImage(Image $image = null)
- {
- $this->image = $image;
- }
- public function getImage()
- {
- return $this->image;
- }
- // Vos autres getters/setters…
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement