Browse Source

ImageTrait

develop
Guillaume 2 years ago
parent
commit
8a64019be4
1 changed files with 26 additions and 0 deletions
  1. +26
    -0
      Doctrine/Extension/ImageTrait.php

+ 26
- 0
Doctrine/Extension/ImageTrait.php View File

<?php

namespace Lc\SovBundle\Doctrine\Extension;

use App\Entity\File\File;
use Doctrine\ORM\Mapping as ORM;

trait ImageTrait
{
/**
* @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\File\FileInterface", cascade={"persist", "remove"}, fetch="EAGER")
*/
protected $image;

public function getImage(): ?File
{
return $this->image;
}

public function setImage(?File $image): self
{
$this->image = $image;

return $this;
}
}

Loading…
Cancel
Save