<?php
namespace App\Entity;
use App\Repository\FaqRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
use Gedmo\Mapping\Annotation as Gedmo;
use Symfony\Component\Validator\Constraints as Assert;
use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
use Symfony\Component\PropertyAccess\PropertyAccess;
/**
* @ORM\Entity(repositoryClass=FaqRepository::class)
*/
class Faq implements TranslatableInterface
{
use TranslatableTrait;
/**
* @ORM\Id
* @ORM\GeneratedValue
* @ORM\Column(type="integer")
*/
private $id;
/**
* @ORM\Column(type="integer", nullable=true)
*/
private $position;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private $publier;
protected $translations;
public function __construct()
{
}
public function getId(): ?int
{
return $this->id;
}
public function getPosition(): ?int
{
return $this->position;
}
public function setPosition(?int $position): self
{
$this->position = $position;
return $this;
}
public function getPublier(): ?bool
{
return $this->publier;
}
public function setPublier(?bool $publier): self
{
$this->publier = $publier;
return $this;
}
public function __toString(){
return $this->getTitre();
}
public function __call($method, $arguments)
{
return PropertyAccess::createPropertyAccessor()->getValue($this->translate(), $method);
}
}