src/Entity/Gos/FaqItem.php line 10

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gos;
  3. use Doctrine\ORM\Mapping as ORM;
  4. /**
  5.  * @ORM\Entity(repositoryClass="App\Repository\FaqItemRepository")
  6.  */
  7. class FaqItem
  8. {
  9.     /**
  10.      * @ORM\Id()
  11.      * @ORM\GeneratedValue()
  12.      * @ORM\Column(type="integer")
  13.      */
  14.     private $id;
  15.     /**
  16.      * @ORM\Column(type="string", length=255)
  17.      */
  18.     private $question;
  19.     /**
  20.      * @ORM\Column(type="text")
  21.      */
  22.     private $answer;
  23.     /**
  24.      * @ORM\ManyToOne(targetEntity="App\Entity\Gos\FaqSection", inversedBy="faqItems", cascade={"persist"})
  25.      */
  26.     private $faqSection;
  27.     public function __toString()
  28.     {
  29.         return $this->question;
  30.     }
  31.     public function getId(): ?int
  32.     {
  33.         return $this->id;
  34.     }
  35.     public function getQuestion(): ?string
  36.     {
  37.         return $this->question;
  38.     }
  39.     public function setQuestion(string $question): self
  40.     {
  41.         $this->question $question;
  42.         return $this;
  43.     }
  44.     public function getAnswer(): ?string
  45.     {
  46.         return $this->answer;
  47.     }
  48.     public function setAnswer(string $answer): self
  49.     {
  50.         $this->answer $answer;
  51.         return $this;
  52.     }
  53.     public function getFaqSection(): ?FaqSection
  54.     {
  55.         return $this->faqSection;
  56.     }
  57.     public function setFaqSection(?FaqSection $faqSection): self
  58.     {
  59.         $this->faqSection $faqSection;
  60.         return $this;
  61.     }
  62. }