|
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <?php
-
- namespace Lc\ShopBundle\Model;
-
- use Doctrine\ORM\Mapping as ORM;
- use Symfony\Component\HttpFoundation\File\File;
-
-
- trait ImageTrait
- {
-
-
- protected $image;
-
-
-
- protected $imageFile;
-
- public function setImageFile(File $image = null)
- {
- $this->imageFile = $image;
-
-
-
-
- if ($image) {
-
- $this->updatedAt = new \DateTime('now');
- }
- }
-
- public function getImageFile()
- {
- return $this->imageFile;
- }
-
- public function getImage(): ?string
- {
- return $this->image;
- }
-
- public function setImage(?string $image): self
- {
- $this->image = $image;
-
- return $this;
- }
-
-
- }
|