src/Entity/System/CategoryLang.php line 12

Open in your IDE?
  1. <?php
  2. namespace App\Entity\System;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\System\CategoryLangRepository")
  6.  *
  7.  * @ORM\Table(name="ps_category_lang")
  8.  */
  9. class CategoryLang extends AbstractCategoryLang
  10. {
  11.     /**
  12.      * @ORM\Id()
  13.      *
  14.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Category", inversedBy="langs")
  15.      *
  16.      * @ORM\JoinColumn(referencedColumnName="id_category", name="id_category")
  17.      */
  18.     private Category $category;
  19.     /**
  20.      * @ORM\Id()
  21.      *
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\System\Language")
  23.      *
  24.      * @ORM\JoinColumn(referencedColumnName="id_lang", name="id_lang")
  25.      */
  26.     private Language $language;
  27.     /**
  28.      * @return Category
  29.      */
  30.     public function getCategory(): Category
  31.     {
  32.         return $this->category;
  33.     }
  34.     /**
  35.      * @param Category $category
  36.      *
  37.      * @return CategoryLang
  38.      */
  39.     public function setCategory(Category $category): self
  40.     {
  41.         $this->category $category;
  42.         return $this;
  43.     }
  44.     /**
  45.      * @return Language
  46.      */
  47.     public function getLanguage(): Language
  48.     {
  49.         return $this->language;
  50.     }
  51.     /**
  52.      * @param Language $language
  53.      *
  54.      * @return CategoryLang
  55.      */
  56.     public function setLanguage(Language $language): self
  57.     {
  58.         $this->language $language;
  59.         return $this;
  60.     }
  61. }