src/Entity/Core/VideoReference.php line 12

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