<?php
declare(strict_types=1);
namespace App\Entity\Core;
use App\Entity\Core\Quiz\Quiz;
use Doctrine\ORM\Mapping as ORM;
#[ORM\Table('video_reference')]
#[ORM\Entity]
class VideoReference
{
public const VALID_23_VIDEO_DOMAINS = [
'twentythree.com',
'video.hansreitzel.dk',
'video.munksgaard.dk',
'gyldendalprodukter.videomarketingplatform.co',
'systime.videomarketingplatform.co',
'video.sosuplay.dk',
'video-eudvoksen.gyldendal.dk',
'gym.videomarketingplatform.co',
'kvikmat.videomarketingplatform.co'
];
public const VALID_VIDEO_DOMAINS = [
'gyldendal.h5p.com',
'vimeo.com',
'youtube.com',
'youtu.be',
...self::VALID_23_VIDEO_DOMAINS
];
#[ORM\Column(type: 'integer')]
#[ORM\Id]
#[ORM\GeneratedValue]
private int $id;
#[ORM\Column(name: 'url', type: 'string', length: 255, nullable: false)]
private string $url;
#[ORM\Column(name: 'position', type: 'string', nullable: true)]
private ?string $position;
#[ORM\Column(name: 'alt_text', type: 'string', nullable: true)]
private ?string $altText;
#[ORM\Column(name: 'credit_text', type: 'string', nullable: true)]
private string $creditText;
#[ORM\OneToOne(targetEntity: Mathproblem::class, mappedBy: 'videoReference')]
private ?Mathproblem $mathproblem;
#[ORM\OneToOne(targetEntity: Quiz::class, mappedBy: 'videoReference')]
private ?Quiz $quiz;
public function __construct()
{
$this->mathproblem = null;
$this->quiz = null;
}
public function getId(): int
{
return $this->id;
}
public function setId(int $id): void
{
$this->id = $id;
}
public function getUrl(): string
{
return $this->url;
}
public function setUrl(string $url): void
{
$this->url = $url;
}
public function getPosition(): ?string
{
return $this->position;
}
public function setPosition(?string $position): void
{
$this->position = $position;
}
public function getAltText(): ?string
{
return $this->altText;
}
public function setAltText(?string $altText): void
{
$this->altText = $altText;
}
public function getCreditText(): string
{
return $this->creditText;
}
public function setCreditText(string $creditText): void
{
$this->creditText = $creditText;
}
public function getMathproblem(): ?Mathproblem
{
return $this->mathproblem;
}
public function setMathproblem(?Mathproblem $mathproblem): void
{
$this->mathproblem = $mathproblem;
}
public function getQuiz(): ?Quiz
{
return $this->quiz;
}
public function setQuiz(?Quiz $quiz): void
{
$this->quiz = $quiz;
}
}