src/Entity/Otpusk/GeoSeoUrl.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Otpusk;
  3. use App\Repository\Otpusk\GeoSeoUrlRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Gedmo\Timestampable\Traits\TimestampableEntity;
  8. use Knp\DoctrineBehaviors\Contract\Entity\TranslatableInterface;
  9. use Knp\DoctrineBehaviors\Model\Translatable\TranslatableTrait;
  10. use Gedmo\Mapping\Annotation as Gedmo;
  11. /**
  12.  * @ORM\Entity(repositoryClass=GeoSeoUrlRepository::class)
  13.  */
  14. class GeoSeoUrl implements TranslatableInterface
  15. {
  16.     use TimestampableEntity;
  17.     use TranslatableTrait;
  18.     /**
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @ORM\Column(type="string", length=1024)
  26.      */
  27.     private $name;
  28.     /**
  29.      * @ORM\Column(type="string", length=1024)
  30.      */
  31.     private $url;
  32.     /**
  33.      * @ORM\Column(type="boolean")
  34.      */
  35.     private $published;
  36.     /**
  37.      * @var integer
  38.      * @Gedmo\SortablePosition
  39.      * @ORM\Column(name="priority", type="integer", options={"default":0}, nullable=true)
  40.      */
  41.     private $position 0;
  42.     /**
  43.      * @ORM\Column(type="array", nullable=true)
  44.      */
  45.     private $countries = [];
  46.     /**
  47.      * @ORM\Column(type="array", nullable=true)
  48.      */
  49.     private $cities = [];
  50.     public function getId(): ?int
  51.     {
  52.         return $this->id;
  53.     }
  54.     public function getName(): ?string
  55.     {
  56.         return $this->name;
  57.     }
  58.     public function setName(string $name): self
  59.     {
  60.         $this->name $name;
  61.         return $this;
  62.     }
  63.     public function getUrl(): ?string
  64.     {
  65.         return $this->url;
  66.     }
  67.     public function setUrl(string $url): self
  68.     {
  69.         $this->url $url;
  70.         return $this;
  71.     }
  72.     public function getPublished(): ?bool
  73.     {
  74.         return $this->published;
  75.     }
  76.     public function setPublished(bool $published): self
  77.     {
  78.         $this->published $published;
  79.         return $this;
  80.     }
  81.     public function getPosition(): ?int
  82.     {
  83.         return $this->position;
  84.     }
  85.     public function setPosition(?int $position): self
  86.     {
  87.         $this->position = ( ! is_null($position)) ? $position 0;
  88.         return $this;
  89.     }
  90.     public function getCountries()
  91.     {
  92.         return $this->countries;
  93.     }
  94.     public function setCountries(?array $countries): self
  95.     {
  96.         $this->countries $countries;
  97.         return $this;
  98.     }
  99.     public function getCities()
  100.     {
  101.         return $this->cities;
  102.     }
  103.     public function setCities(?array $cities): self
  104.     {
  105.         $this->cities $cities;
  106.         return $this;
  107.     }
  108. }