src/Entity/ArticleCategory.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\ArticleCategoryRepository")
  6.  */
  7. class ArticleCategory
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      *
  12.      * @ORM\GeneratedValue()
  13.      *
  14.      * @ORM\Column(type="integer")
  15.      */
  16.     private $id;
  17.     /**
  18.      * @ORM\ManyToOne(targetEntity="App\Entity\Article", inversedBy="articleCategories")
  19.      */
  20.     private $article;
  21.     /**
  22.      * @ORM\ManyToOne(targetEntity="App\Entity\Category", inversedBy="articleCategories")
  23.      */
  24.     private $category;
  25.     public function getId(): ?int
  26.     {
  27.         return $this->id;
  28.     }
  29.     public function getArticle(): ?Article
  30.     {
  31.         return $this->article;
  32.     }
  33.     public function setArticle(?Article $article): self
  34.     {
  35.         $this->article $article;
  36.         return $this;
  37.     }
  38.     public function getCategory(): ?Category
  39.     {
  40.         return $this->category;
  41.     }
  42.     public function setCategory(?Category $category): self
  43.     {
  44.         $this->category $category;
  45.         return $this;
  46.     }
  47. }