You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
474B

  1. <?php
  2. namespace Lc\SovBundle\Doctrine\Extension;
  3. use App\Entity\File\File;
  4. use Doctrine\ORM\Mapping as ORM;
  5. trait ImageTrait
  6. {
  7. #[ORM\ManyToOne(targetEntity: 'Lc\SovBundle\Model\File\FileInterface', cascade: ['persist', 'remove'], fetch: 'EAGER')]
  8. protected $image;
  9. public function getImage(): ?File
  10. {
  11. return $this->image;
  12. }
  13. public function setImage(?File $image): self
  14. {
  15. $this->image = $image;
  16. return $this;
  17. }
  18. }