Sfoglia il codice sorgente

ImageTrait

develop
Guillaume 2 anni fa
parent
commit
8a64019be4
1 ha cambiato i file con 26 aggiunte e 0 eliminazioni
  1. +26
    -0
      Doctrine/Extension/ImageTrait.php

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

@@ -0,0 +1,26 @@
<?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…
Annulla
Salva