Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
trash
/
vhost_www.bachtale.com_1719306535
/
htdocs
/
src
/
Entity
/
//srv/data/trash/vhost_www.bachtale.com_1719306535/htdocs/src/Entity/Slider.php
<?php namespace App\Entity; use Doctrine\ORM\Mapping as ORM; use Symfony\Component\HttpFoundation\File\File; use Vich\UploaderBundle\Mapping\Annotation as Vich; use Symfony\Component\Validator\Constraints as Assert; use Vich\UploaderBundle\Mapping\Annotation\Uploadable; use Symfony\Component\HttpFoundation\File\UploadedFile; use Vich\UploaderBundle\Mapping\Annotation\UploadableField; /** * @ORM\Entity(repositoryClass="App\Repository\SliderRepository") * @Vich\Uploadable */ class Slider { /** * @ORM\Id() * @ORM\GeneratedValue() * @ORM\Column(type="integer") */ private $id; /** * NOTE: This is not a mapped field of entity metadata, just a simple property. * * @Vich\UploadableField(mapping="slider_images", fileNameProperty="imagesName") * @Assert\Image( * minWidth = 1430, * ) * @Assert\File(mimeTypes = {"image/jpg", "image/jpeg"}) * * @var File */ private $imagesFile; /** * @ORM\Column(type="string", length=255, nullable=true) * * @var string */ private $imagesName; /** * @ORM\Column(type="datetime") */ private $createdAt; /** * @ORM\Column(type="datetime") */ private $updatedAt; /** * @ORM\Column(type="text", nullable=true) * @Assert\Length(min=150) */ private $content; /** * @ORM\Column(type="boolean") */ private $position; /** * @ORM\Column(type="boolean") */ private $isActive; /** * @ORM\Column(type="string", length=255) */ private $colorBg; /** * @ORM\Column(type="string", length=255) */ private $colorText; /** * @ORM\Column(type="string", length=255) */ private $title; public function __construct() { $this->position = true; $this->isActive = true; $this->createdAt = new \DateTime(); $this->updatedAt = new \DateTime(); } public function getId(): ?int { return $this->id; } public function getCreatedAt(): ?\DateTimeInterface { return $this->createdAt; } public function setCreatedAt(\DateTimeInterface $createdAt): self { $this->createdAt = $createdAt; return $this; } public function getUpdatedAt(): ?\DateTimeInterface { return $this->updatedAt; } public function setUpdatedAt(\DateTimeInterface $updatedAt): self { $this->updatedAt = $updatedAt; return $this; } /** * @param File|\Symfony\Component\HttpFoundation\File\UploadedFile $imagesFile * */ public function setImagesFile(?File $imagesFile = null): void { $this->imagesFile = $imagesFile; if (null !== $imagesFile) { // It is required that at least one field changes if you are using doctrine // otherwise the event listeners won't be called and the file is lost $this->updatedAt = new \DateTimeImmutable(); } } public function getImagesFile(): ?File { return $this->imagesFile; } public function setImagesName(?string $imagesName): void { $this->imagesName = $imagesName; } public function getImagesName(): ?string { return $this->imagesName; } public function getContent(): ?string { return $this->content; } public function setContent(?string $content): self { $this->content = $content; return $this; } public function getPosition(): ?bool { return $this->position; } public function setPosition(bool $position): self { $this->position = $position; return $this; } public function getIsActive(): ?bool { return $this->isActive; } public function setIsActive(bool $isActive): self { $this->isActive = $isActive; return $this; } public function getColorBg(): ?string { return $this->colorBg; } public function setColorBg(string $colorBg): self { $this->colorBg = $colorBg; return $this; } public function getColorText(): ?string { return $this->colorText; } public function setColorText(string $colorText): self { $this->colorText = $colorText; return $this; } public function getTitle(): ?string { return $this->title; } public function setTitle(string $title): self { $this->title = $title; return $this; } }