src/CoreBundle/Entity/VideoReference.php line 13

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace CoreBundle\Entity;
  4. use Doctrine\ORM\Mapping as ORM;
  5. /**
  6. * @ORM\Table("video_reference")
  7. * @ORM\Entity
  8. */
  9. class VideoReference
  10. {
  11. public const VALID_23_VIDEO_DOMAINS = [
  12. 'twentythree.com',
  13. 'video.hansreitzel.dk',
  14. 'video.munksgaard.dk',
  15. 'gyldendalprodukter.videomarketingplatform.co',
  16. 'systime.videomarketingplatform.co',
  17. 'video.sosuplay.dk',
  18. 'video-eudvoksen.gyldendal.dk',
  19. 'gym.videomarketingplatform.co',
  20. 'kvikmat.videomarketingplatform.co'
  21. ];
  22. public const VALID_VIDEO_DOMAINS = [
  23. 'gyldendal.h5p.com',
  24. 'vimeo.com',
  25. 'youtube.com',
  26. 'youtu.be',
  27. ...self::VALID_23_VIDEO_DOMAINS
  28. ];
  29. /**
  30. * @ORM\Column(type="integer")
  31. * @ORM\Id
  32. * @ORM\GeneratedValue
  33. */
  34. private int $id;
  35. /**
  36. * @ORM\Column(name="url", type="string", length=255, nullable=false)
  37. */
  38. private string $url;
  39. /**
  40. * @ORM\Column(name="position", type="string", nullable=true)
  41. */
  42. private ?string $position;
  43. /**
  44. * @ORM\Column(name="alt_text", type="string", nullable=true)
  45. */
  46. private ?string $altText;
  47. /**
  48. * @ORM\Column(name="credit_text", type="string", nullable=true)
  49. */
  50. private string $creditText;
  51. /**
  52. * @ORM\OneToOne(targetEntity="CoreBundle\Entity\Mathproblem", mappedBy="videoReference")
  53. */
  54. private ?Mathproblem $mathproblem;
  55. /**
  56. * @ORM\OneToOne(targetEntity="CoreBundle\Entity\Quiz", mappedBy="videoReference")
  57. */
  58. private ?Quiz $quiz;
  59. public function __construct()
  60. {
  61. $this->mathproblem = null;
  62. $this->quiz = null;
  63. }
  64. public function getId(): int
  65. {
  66. return $this->id;
  67. }
  68. public function setId(int $id): void
  69. {
  70. $this->id = $id;
  71. }
  72. public function getUrl(): string
  73. {
  74. return $this->url;
  75. }
  76. public function setUrl(string $url): void
  77. {
  78. $this->url = $url;
  79. }
  80. public function getPosition(): ?string
  81. {
  82. return $this->position;
  83. }
  84. public function setPosition(?string $position): void
  85. {
  86. $this->position = $position;
  87. }
  88. public function getAltText(): ?string
  89. {
  90. return $this->altText;
  91. }
  92. public function setAltText(?string $altText): void
  93. {
  94. $this->altText = $altText;
  95. }
  96. public function getCreditText(): string
  97. {
  98. return $this->creditText;
  99. }
  100. public function setCreditText(string $creditText): void
  101. {
  102. $this->creditText = $creditText;
  103. }
  104. public function getMathproblem(): ?Mathproblem
  105. {
  106. return $this->mathproblem;
  107. }
  108. public function setMathproblem(?Mathproblem $mathproblem): void
  109. {
  110. $this->mathproblem = $mathproblem;
  111. }
  112. public function getQuiz(): ?Quiz
  113. {
  114. return $this->quiz;
  115. }
  116. public function setQuiz(?Quiz $quiz): void
  117. {
  118. $this->quiz = $quiz;
  119. }
  120. }