- <?php
-
- namespace Lc\ShopBundle\Model;
-
- use Doctrine\ORM\Mapping as ORM;
- use Symfony\Component\HttpFoundation\File\File;
- use Vich\UploaderBundle\Mapping\Annotation as Vich;
-
-
- trait OpenGraphTrait
- {
-
-
- protected $openGraphTitle;
-
-
-
- protected $openGraphDescription;
-
-
-
- protected $openGraphImage;
-
-
-
- protected $openGraphImageFile;
-
-
- public function getOpenGraphTitle(): ?string
- {
- return $this->openGraphTitle;
- }
-
- public function setOpenGraphTitle(string $openGraphTitle): self
- {
- $this->openGraphTitle = $openGraphTitle;
-
- return $this;
- }
-
- public function getOpenGraphDescription(): ?string
- {
- return $this->openGraphDescription;
- }
-
- public function setOpenGraphDescription(?string $openGraphDescription): self
- {
- $this->openGraphDescription = $openGraphDescription;
-
- return $this;
- }
-
- public function getOpenGraphImage(): ?string
- {
- return $this->openGraphImage;
- }
-
- public function setOpenGraphImage(?string $openGraphImage): self
- {
- $this->openGraphImage = $openGraphImage;
-
- return $this;
- }
-
- public function setOpenGraphImageFile(File $openGraphImageFile = null)
- {
- $this->openGraphImageFile = $openGraphImageFile;
-
-
-
-
- if ($openGraphImageFile) {
-
- $this->updatedAt = new \DateTime('now');
- }
- }
-
- public function getOpenGraphImageFile()
- {
- return $this->openGraphImageFile ;
- }
-
- }
|