src/Entity/Sett.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use App\Repository\SettRepository;
  5. use Gedmo\Translatable\Translatable;
  6. use Doctrine\ORM\Mapping\UniqueConstraint;
  7. use App\Entity\Translation\PageTranslation;
  8. use App\Entity\Translation\SettTranslation;
  9. use Gedmo\Mapping\Annotation\TranslationEntity;
  10. use Doctrine\Common\Collections\ArrayCollection;
  11. use Gedmo\Mapping\Annotation\Locale as GedmoLocale;
  12. use Gedmo\Mapping\Annotation\Translatable as GedmoTranslatable;
  13. #[ORM\Entity(repositoryClassSettRepository::class)]
  14. #[UniqueConstraint(name"intname"columns: ["intname"])]
  15. #[TranslationEntity(class: SettTranslation::class)]
  16. class Sett implements EntityInterface
  17. {
  18.     #[ORM\Id]
  19.     #[ORM\GeneratedValue]
  20.     #[ORM\Column(type'integer')]
  21.     private $id;
  22.     #[ORM\Column(type'string'length255)]
  23.     private $type '';
  24.     #[ORM\Column(type'string'length255)]
  25.     private $intname;
  26.     
  27.     #[ORM\Column(type'string'length255)]
  28.     private $name '';
  29.     #[GedmoTranslatable]
  30.     #[ORM\Column(type'text')]
  31.     private $value '';
  32.     #[GedmoLocale]
  33.     private $locale;
  34.     
  35.     #[ORM\OneToMany(targetEntitySettTranslation::class, mappedBy'object'cascade: ['persist''remove'])]
  36.     private $translations;
  37.     public function __construct()
  38.     {
  39.         $this->translations = new ArrayCollection();
  40.     }
  41.     public function setLocale($locale)
  42.     {
  43.         $this->locale $locale;
  44.     }
  45.     public function getTranslations()
  46.     {
  47.         return $this->translations;
  48.     }
  49.     public function addTranslation(SettTranslation $t)
  50.     {
  51.         if (!$this->translations->contains($t)) {
  52.             $this->translations[] = $t;
  53.             $t->setObject($this);
  54.         }
  55.     }
  56.     public function getId(): ?int
  57.     {
  58.         return $this->id;
  59.     }
  60.     public function getIntname(): ?string
  61.     {
  62.         return $this->intname;
  63.     }
  64.     public function setIntname(string $intname): self
  65.     {
  66.         $this->intname $intname;
  67.         return $this;
  68.     }
  69.     public function getType(): ?string
  70.     {
  71.         return $this->type;
  72.     }
  73.     public function setType(string $type): self
  74.     {
  75.         $this->type $type;
  76.         return $this;
  77.     }
  78.     public function getName(): ?string
  79.     {
  80.         return $this->name;
  81.     }
  82.     public function setName(string $name): self
  83.     {
  84.         $this->name $name;
  85.         return $this;
  86.     }
  87.     public function getValue(): ?string
  88.     {
  89.         return $this->value;
  90.     }
  91.     public function setValue(string $value): self
  92.     {
  93.         $this->value $value;
  94.         return $this;
  95.     }
  96. }