|
- <?php
-
- namespace App\Entity\Site;
-
- use App\Repository\Site\BlockRepository;
- use Doctrine\ORM\Mapping as ORM;
- use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
- use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
- use Lc\SovBundle\Doctrine\EntityInterface;
- use Lc\SovBundle\Doctrine\Extension\StatusInterface;
- use Lc\SovBundle\Doctrine\Extension\StatusTrait;
- use Lc\SovBundle\Model\File\FileInterface;
-
- /**
- * @ORM\Entity(repositoryClass=BlockRepository::class)
- */
- class Block implements EntityInterface, StatusInterface, TranslatableInterface
- {
- use StatusTrait;
- use TranslatableTrait;
-
- /**
- * @ORM\Id
- * @ORM\GeneratedValue
- * @ORM\Column(type="integer")
- */
- private $id;
-
- /**
- * @ORM\Column(type="string", length=255)
- */
- private $devAlias;
-
- /**
- * @ORM\Column(type="string", length=255)
- */
- private $page;
-
- /**
- * @ORM\ManyToOne(targetEntity="Lc\SovBundle\Model\File\FileInterface", cascade={"persist", "remove"})
- */
- private $image;
-
- // public function __call($method, $arguments)
- // {
- // dump('_call');
- // dump($method);
- // $method = ('get' === substr($method, 0, 3) || 'set' === substr($method, 0, 3)) ? $method : 'get' . ucfirst(
- // $method
- // );
- // return $this->proxyCurrentLocaleTranslation($method, $arguments);
- // }
-
- public function __get($name)
- {
- $method = 'get' . ucfirst($name);
- $arguments = [];
- return $this->proxyCurrentLocaleTranslation($method, $arguments);
- }
-
- public function __set($name, $value)
- {
- $method = 'set' . ucfirst($name);
- $arguments = [$value];
- return $this->proxyCurrentLocaleTranslation($method, $arguments);
- }
-
- public function __toString()
- {
- return $this->page;
- }
-
- public function getId(): ?int
- {
- return $this->id;
- }
-
- public function getDevAlias(): ?string
- {
- return $this->devAlias;
- }
-
- public function setDevAlias(string $devAlias): self
- {
- $this->devAlias = $devAlias;
-
- return $this;
- }
-
- public function getPage(): ?string
- {
- return $this->page;
- }
-
- public function setPage(string $page): self
- {
- $this->page = $page;
-
- return $this;
- }
-
- public function getImage(): ?FileInterface
- {
- return $this->image;
- }
-
- public function setImage(?FileInterface $image): self
- {
- $this->image = $image;
-
- return $this;
- }
- }
|