Add short and long PDF paths to elements, keep pdfPath as a short PDF compatibility alias, and route generic file uploads by fileType.
107 lines
2.1 KiB
PHP
107 lines
2.1 KiB
PHP
<?php
|
|
|
|
namespace App\Element;
|
|
|
|
use App\Set\Set;
|
|
|
|
class Element
|
|
{
|
|
public function __construct(
|
|
private int $id,
|
|
private string $title,
|
|
private string $description,
|
|
private ?string $iconImageUrl,
|
|
private string $richText,
|
|
private ?string $shortPdfPath,
|
|
private ?string $longPdfPath,
|
|
private ?string $youtubeUrl,
|
|
private Set $set,
|
|
private ?Element $parentElement,
|
|
) {
|
|
}
|
|
|
|
public function getId(): int
|
|
{
|
|
return $this->id;
|
|
}
|
|
|
|
public function getTitle(): string
|
|
{
|
|
return $this->title;
|
|
}
|
|
|
|
public function setTitle(string $title): void
|
|
{
|
|
$this->title = $title;
|
|
}
|
|
|
|
public function getDescription(): string
|
|
{
|
|
return $this->description;
|
|
}
|
|
|
|
public function setDescription(string $description): void
|
|
{
|
|
$this->description = $description;
|
|
}
|
|
|
|
public function getIconImageUrl(): ?string
|
|
{
|
|
return $this->iconImageUrl;
|
|
}
|
|
|
|
public function setIconImageUrl(?string $iconImageUrl): void
|
|
{
|
|
$this->iconImageUrl = $iconImageUrl;
|
|
}
|
|
|
|
public function getRichText(): string
|
|
{
|
|
return $this->richText;
|
|
}
|
|
|
|
public function setRichText(string $richText): void
|
|
{
|
|
$this->richText = $richText;
|
|
}
|
|
|
|
public function getShortPdfPath(): ?string
|
|
{
|
|
return $this->shortPdfPath;
|
|
}
|
|
|
|
public function setShortPdfPath(?string $shortPdfPath): void
|
|
{
|
|
$this->shortPdfPath = $shortPdfPath;
|
|
}
|
|
|
|
public function getLongPdfPath(): ?string
|
|
{
|
|
return $this->longPdfPath;
|
|
}
|
|
|
|
public function setLongPdfPath(?string $longPdfPath): void
|
|
{
|
|
$this->longPdfPath = $longPdfPath;
|
|
}
|
|
|
|
public function getYoutubeUrl(): ?string
|
|
{
|
|
return $this->youtubeUrl;
|
|
}
|
|
|
|
public function setYoutubeUrl(?string $youtubeUrl): void
|
|
{
|
|
$this->youtubeUrl = $youtubeUrl;
|
|
}
|
|
|
|
public function getSet(): Set
|
|
{
|
|
return $this->set;
|
|
}
|
|
|
|
public function getParentElement(): ?Element
|
|
{
|
|
return $this->parentElement;
|
|
}
|
|
}
|