<?php
namespace App\Entity;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\PropertyAccess\PropertyAccess;
use Symfony\Component\Validator\Constraints as Assert;
use Gedmo\Blameable\Traits\BlameableEntity;
use Gedmo\Timestampable\Traits\TimestampableEntity;
use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
use \App\Entity\Media;
use \App\Repository\SlideRepository;
#[ORM\Entity(repositoryClass: SlideRepository::class)]
class Slide implements TranslatableInterface
{
use BlameableEntity;
use TimestampableEntity;
use TranslatableTrait;
#[Assert\Valid]
protected $translations;
#[ORM\Id]
#[ORM\GeneratedValue(strategy: "IDENTITY")]
#[ORM\Column]
private ?int $id = null;
#[ORM\Column(length: 255, nullable: true)]
private ?string $link = null;
#[ORM\Column(nullable: true)]
#[Assert\Positive()]
private ?int $slideOrder = 9999;
public function __call($method, $arguments)
{
return PropertyAccess::createPropertyAccessor()->getValue($this->translate(), $method);
}
public function getId(): ?int
{
return $this->id;
}
public function getLink(): ?string
{
return $this->link;
}
public function setLink(?string $link): self
{
$this->link = $link;
return $this;
}
public function getSlideOrder(): int
{
return $this->slideOrder;
}
public function setSlideOrder(int $slideOrder): self
{
$this->slideOrder = $slideOrder;
return $this;
}
}