src/CoreBundle/Entity/TextbookSubTopic.php line 13

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table("textbook_subtopic")
  7. * @ORM\Entity(repositoryClass="TextbookSubTopicRepository")
  8. */
  9. class TextbookSubTopic
  10. {
  11. /**
  12. * @var int
  13. *
  14. * @ORM\Column(name="id", type="integer")
  15. * @ORM\Id
  16. * @ORM\GeneratedValue(strategy="AUTO")
  17. */
  18. private $id;
  19. /**
  20. * @var int
  21. *
  22. * @ORM\Column(name="sortorder", type="integer")
  23. */
  24. private $order;
  25. /**
  26. * @var string
  27. *
  28. * @ORM\Column(name="name", type="string", length=255)
  29. */
  30. private $name;
  31. /**
  32. * @var TextbookTopic
  33. *
  34. * @ORM\ManyToOne(targetEntity="TextbookTopic", inversedBy="textbookSubTopics")
  35. * @ORM\JoinColumn(name="topic_id", referencedColumnName="id")
  36. */
  37. private $textbookTopic;
  38. /**
  39. * @var TextbookElement[]
  40. *
  41. * @ORM\OneToMany(targetEntity="TextbookElement", mappedBy="textbookSubTopic", cascade={"persist"})
  42. */
  43. private $textbookElements;
  44. /**
  45. *
  46. * @var ArrayCollection
  47. *
  48. * @ORM\OneToMany(targetEntity="TextbookSubTopicQuestion", mappedBy="subTopic", cascade={"persist", "remove"})
  49. */
  50. private $questions;
  51. /**
  52. * @var ArrayCollection|textbookSession[]
  53. * @ORM\ManyToMany(targetEntity="CoreBundle\Entity\TextbookSession", mappedBy="textbookSubtopics")
  54. *
  55. */
  56. private $textbookSessions;
  57. /**
  58. * @var bool
  59. * @ORM\Column(type="boolean", name="is_enabled", options={"default": true})
  60. */
  61. private $isEnabled;
  62. /**
  63. * @return int
  64. */
  65. public function getId(): int
  66. {
  67. return $this->id;
  68. }
  69. /**
  70. * @return int
  71. */
  72. public function getOrder()
  73. {
  74. return $this->order;
  75. }
  76. /**
  77. * @return string
  78. */
  79. public function getName()
  80. {
  81. return $this->name;
  82. }
  83. /**
  84. * @return TextbookTopic
  85. */
  86. public function getTextbookTopic()
  87. {
  88. return $this->textbookTopic;
  89. }
  90. /**
  91. * @return TextbookElement[]
  92. */
  93. public function getTextbookElements()
  94. {
  95. return $this->textbookElements;
  96. }
  97. /**
  98. * @return TextbookSubTopicQuestion[]
  99. */
  100. public function getQuestions()
  101. {
  102. return $this->questions;
  103. }
  104. /**
  105. * @return bool
  106. */
  107. public function isEnabled(): bool
  108. {
  109. return $this->isEnabled;
  110. }
  111. }