src/Entity/Catpage.php line 18

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\DBAL\Types\Types;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Gedmo\Translatable\Translatable;
  6. use App\Repository\CatpageRepository;
  7. use App\Entity\Translation\PageTranslation;
  8. use App\Entity\Translation\CatpageTranslation;
  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(repositoryClassCatpageRepository::class)]
  14. #[TranslationEntity(class: CatpageTranslation::class)]
  15. class Catpage implements EntityInterface
  16. {
  17.     #[ORM\Id]
  18.     #[ORM\GeneratedValue]
  19.     #[ORM\Column]
  20.     private ?int $id null;
  21.     #[ORM\Column(type'integer')]
  22.     private int $cat 0;
  23.     #[ORM\Column(type'integer')]
  24.     private int $brand 0;
  25.     #[ORM\Column(length255)]
  26.     private ?string $intname null;
  27.     #[GedmoTranslatable]
  28.     #[ORM\Column(length255)]
  29.     private ?string $name null;
  30.     #[GedmoTranslatable]
  31.     #[ORM\Column(typeTypes::TEXT)]
  32.     private ?string $cont null;
  33.     #[GedmoTranslatable]
  34.     #[ORM\Column(typeTypes::TEXT)]
  35.     private ?string $cont2 null;
  36.     #[ORM\Column]
  37.     private ?bool $visible null;
  38.     #[ORM\Column(type'integer')]
  39.     private int $prior 0;
  40.     #[GedmoTranslatable]
  41.     #[ORM\Column(length255)]
  42.     private ?string $title null;
  43.     #[GedmoTranslatable]
  44.     #[ORM\Column(length255)]
  45.     private ?string $h1 null;
  46.     #[GedmoTranslatable]
  47.     #[ORM\Column(length255)]
  48.     private ?string $kw null;
  49.     #[GedmoTranslatable]
  50.     #[ORM\Column(length255)]
  51.     private ?string $descr null;
  52.     #[GedmoLocale]
  53.     private $locale;
  54.     #[ORM\OneToMany(targetEntityCatpageTranslation::class, mappedBy'object'cascade: ['persist''remove'])]
  55.     private $translations;
  56.     public function __construct()
  57.     {
  58.         $this->translations = new ArrayCollection();
  59.     }
  60.     public function setLocale($locale)
  61.     {
  62.         $this->locale $locale;
  63.     }
  64.     public function getTranslations()
  65.     {
  66.         return $this->translations;
  67.     }
  68.     public function addTranslation(CatpageTranslation $t)
  69.     {
  70.         if (!$this->translations->contains($t)) {
  71.             $this->translations[] = $t;
  72.             $t->setObject($this);
  73.         }
  74.     }
  75.     
  76.     public function getId(): ?int
  77.     {
  78.         return $this->id;
  79.     }
  80.     public function getCatId(): ?int
  81.     {
  82.         return $this->cat;
  83.     }
  84.     public function setCatId(int $cat_id): self
  85.     {
  86.         $this->cat $cat_id;
  87.         return $this;
  88.     }
  89.     public function getBrandId(): ?int
  90.     {
  91.         return $this->brand;
  92.     }
  93.     public function setBrandId(int $brand_id): self
  94.     {
  95.         $this->brand $brand_id;
  96.         return $this;
  97.     }
  98.     public function getIntname(): ?string
  99.     {
  100.         return $this->intname;
  101.     }
  102.     public function setIntname(string $intname): self
  103.     {
  104.         $this->intname $intname;
  105.         return $this;
  106.     }
  107.     public function getName(): ?string
  108.     {
  109.         return $this->name;
  110.     }
  111.     public function setName(string $name): self
  112.     {
  113.         $this->name $name;
  114.         return $this;
  115.     }
  116.     public function getCont(): ?string
  117.     {
  118.         return $this->cont;
  119.     }
  120.     public function setCont(string $cont): self
  121.     {
  122.         $this->cont $cont;
  123.         return $this;
  124.     }
  125.     public function getCont2(): ?string
  126.     {
  127.         return $this->cont2;
  128.     }
  129.     public function setCont2(string $cont2): self
  130.     {
  131.         $this->cont2 $cont2;
  132.         return $this;
  133.     }
  134.     public function isVisible(): ?bool
  135.     {
  136.         return $this->visible;
  137.     }
  138.     public function setVisible(bool $visible): self
  139.     {
  140.         $this->visible $visible;
  141.         return $this;
  142.     }
  143.     public function getPrior(): ?int
  144.     {
  145.         return $this->prior;
  146.     }
  147.     public function setPrior(int $prior): self
  148.     {
  149.         $this->prior $prior;
  150.         return $this;
  151.     }
  152.     public function getTitle(): ?string
  153.     {
  154.         return $this->title;
  155.     }
  156.     public function setTitle(string $title): self
  157.     {
  158.         $this->title $title;
  159.         return $this;
  160.     }
  161.     public function getH1(): ?string
  162.     {
  163.         return $this->h1;
  164.     }
  165.     public function setH1(string $h1): self
  166.     {
  167.         $this->h1 $h1;
  168.         return $this;
  169.     }
  170.     public function getKw(): ?string
  171.     {
  172.         return $this->kw;
  173.     }
  174.     public function setKw(string $kw): self
  175.     {
  176.         $this->kw $kw;
  177.         return $this;
  178.     }
  179.     public function getDescr(): ?string
  180.     {
  181.         return $this->descr;
  182.     }
  183.     public function setDescr(string $descr): self
  184.     {
  185.         $this->descr $descr;
  186.         return $this;
  187.     }
  188. }