src/CoreBundle/Entity/SelfStudyCategory.php line 14

Open in your IDE?
  1. <?php
  2. namespace CoreBundle\Entity;
  3. use Doctrine\ORM\Mapping as ORM;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. /**
  7. * @ORM\Table("self_study_category")
  8. * @ORM\Entity
  9. */
  10. class SelfStudyCategory
  11. {
  12. /**
  13. * @var int
  14. *
  15. * @ORM\Column(name="id", type="integer")
  16. * @ORM\Id
  17. * @ORM\GeneratedValue(strategy="AUTO")
  18. */
  19. private $id;
  20. /**
  21. * @var string
  22. *
  23. * @ORM\Column(name="display_name", type="string", length=255)
  24. */
  25. private $displayName;
  26. /**
  27. * @var string
  28. *
  29. * @ORM\Column(name="icon", type="string", length=255, nullable=true)
  30. */
  31. private $icon;
  32. /**
  33. * @var string
  34. *
  35. * @ORM\Column(name="image", type="string", length=255, nullable=true)
  36. */
  37. private $image;
  38. /**
  39. * @var string
  40. *
  41. * @ORM\Column(name="teaser", type="string", length=1000, nullable=true)
  42. */
  43. private $teaser;
  44. /**
  45. * @var int
  46. *
  47. * @ORM\Column(name="sort_order", type="integer", nullable=true, options={"default"=0})
  48. */
  49. private $sortOrder;
  50. /**
  51. * @var SelfStudy
  52. *
  53. * @ORM\ManyToOne(targetEntity="CoreBundle\Entity\SelfStudy", inversedBy="selfStudyCategories")
  54. * @ORM\JoinColumn(name="self_study", referencedColumnName="id")
  55. */
  56. private $selfStudy;
  57. /**
  58. * @var SelfStudyTopic[]
  59. *
  60. * @ORM\OneToMany(targetEntity="CoreBundle\Entity\SelfStudyTopic", mappedBy="selfStudyCategory", cascade={"persist"})
  61. */
  62. private $selfStudyTopics;
  63. public function __construct()
  64. {
  65. $this->selfStudyTopics = new ArrayCollection();
  66. }
  67. public function getId(): int
  68. {
  69. return $this->id;
  70. }
  71. public function getDisplayName(): string
  72. {
  73. return $this->displayName;
  74. }
  75. public function getSelfStudy(): SelfStudy
  76. {
  77. return $this->selfStudy;
  78. }
  79. public function getIcon(): string
  80. {
  81. return $this->icon;
  82. }
  83. public function getImage(): string
  84. {
  85. return $this->image;
  86. }
  87. public function getTeaser(): ?string
  88. {
  89. return $this->teaser;
  90. }
  91. public function getSelfStudyTopics(): Collection
  92. {
  93. return $this->selfStudyTopics;
  94. }
  95. public function getSortOrder(): int
  96. {
  97. return $this->sortOrder;
  98. }
  99. }