src/Entity/Media.php line 11
<?phpnamespace App\Entity;use App\Repository\MediaRepository;use Doctrine\DBAL\Types\Types;use Doctrine\ORM\Mapping as ORM;use Gedmo\Mapping\Annotation as Gedmo;#[ORM\Entity(repositoryClass: MediaRepository::class)]class Media{const TYPE_PODCAST = "podcast";const TYPE_TESTIMONY = "testimony";static public function getTypeOptions(){return ['Podcast' => self::TYPE_PODCAST,'Ćwiadectwo' => self::TYPE_TESTIMONY,];}#[ORM\Id]#[ORM\GeneratedValue]#[ORM\Column]private ?int $id = null;#[ORM\Column(length: 255)]#[Gedmo\SortableGroup]private ?string $type = null;#[ORM\Column(length: 255)]private ?string $title = null;#[ORM\Column(type: Types::TEXT, nullable: true)]private ?string $description = null;#[ORM\Column(length: 255)]private ?string $link = null;#[ORM\Column]private ?bool $active = null;#[ORM\Column]#[Gedmo\SortablePosition]private ?int $position = null;#[ORM\Column(length: 255, nullable: true)]private ?string $subtitles = null;#[ORM\Column(length: 255, nullable: true)]private ?string $image = null;#[ORM\Column(length: 255, nullable: true)]private ?string $parameter = null;#[ORM\Column(length: 255, nullable: true)]private ?string $podcast = null;public function clone(): Media{$new = new Media();$new->setType($this->type);$new->setTitle($this->title);$new->setDescription($this->description);$new->setLink($this->link);$new->setActive($this->active);$new->setPosition(-1);$new->setSubtitles($this->subtitles);$new->setImage($this->image);$new->setParameter($this->parameter);$new->setPodcast($this->podcast);return $new;}public function getId(): ?int{return $this->id;}public function getType(): ?string{return $this->type;}public function setType(string $type): self{$this->type = $type;return $this;}public function getTitle(): ?string{return $this->title;}public function setTitle(string $title): self{$this->title = $title;return $this;}public function getDescription(): ?string{return $this->description;}public function setDescription(?string $description): self{$this->description = $description;return $this;}public function getLink(): ?string{return ($this->link ? $this->link : '');}public function setLink(string $link): self{$this->link = $link;return $this;}public function isActive(): ?bool{return $this->active;}public function setActive(bool $active): self{$this->active = $active;return $this;}public function getPosition(): ?int{return $this->position;}public function setPosition(int $position = -1): self{$this->position = $position;return $this;}public function getSubtitles(): ?string{return ($this->subtitles ? $this->subtitles : '');}public function setSubtitles(?string $subtitles): self{$this->subtitles = $subtitles;return $this;}public function getImage(): ?string{return ($this->image ? $this->image : '');}public function setImage(?string $image): self{$this->image = $image;return $this;}public function getParameter(): ?string{return $this->parameter;}public function setParameter(?string $parameter): self{$this->parameter = $parameter;return $this;}public function getPodcast(): ?string{return $this->podcast;}public function setPodcast(?string $podcast): self{$this->podcast = $podcast;return $this;}}