*/ protected $arrayView = [ self::VIEW_HANDOUT, self::VIEW_NOTES, self::VIEW_NOTES_MASTER, self::VIEW_OUTLINE, self::VIEW_SLIDE, self::VIEW_SLIDE_MASTER, self::VIEW_SLIDE_SORTER, self::VIEW_SLIDE_THUMBNAIL, ]; public const SLIDESHOW_TYPE_PRESENT = 'present'; public const SLIDESHOW_TYPE_BROWSE = 'browse'; public const SLIDESHOW_TYPE_KIOSK = 'kiosk'; /** * @var array */ protected $arraySlideshowTypes = [ self::SLIDESHOW_TYPE_PRESENT, self::SLIDESHOW_TYPE_BROWSE, self::SLIDESHOW_TYPE_KIOSK, ]; /** * @var bool */ protected $isLoopUntilEsc = false; /** * Mark as final. * * @var bool */ protected $markAsFinal = false; /** * @var string|null */ protected $thumbnail; /** * Zoom. * * @var float */ protected $zoom = 1.0; /** * @var string */ protected $lastView = self::VIEW_SLIDE; /** * @var string */ protected $slideshowType = self::SLIDESHOW_TYPE_PRESENT; /** * @var bool */ protected $isCommentVisible = false; public function isLoopContinuouslyUntilEsc(): bool { return $this->isLoopUntilEsc; } public function setLoopContinuouslyUntilEsc(bool $value = false): self { $this->isLoopUntilEsc = $value; return $this; } /** * Return the thumbnail file path. * * @return string|null */ public function getThumbnailPath(): ?string { return $this->thumbnail; } /** * Define the path for the thumbnail file / preview picture. * * @param string $path * * @return self */ public function setThumbnailPath(string $path = ''): self { if (\file_exists($path)) { $this->thumbnail = $path; } return $this; } /** * Mark a document as final. */ public function markAsFinal(bool $state = true): self { $this->markAsFinal = $state; return $this; } /** * Return if this document is marked as final. * * @return bool */ public function isMarkedAsFinal(): bool { return $this->markAsFinal; } /** * Set the zoom of the document (in percentage). */ public function setZoom(float $zoom = 1.0): self { $this->zoom = $zoom; return $this; } /** * Return the zoom (in percentage). */ public function getZoom(): float { return $this->zoom; } /** * @param string $value * * @return self */ public function setLastView(string $value = self::VIEW_SLIDE): self { if (\in_array($value, $this->arrayView)) { $this->lastView = $value; } return $this; } /** * @return string */ public function getLastView(): string { return $this->lastView; } public function setCommentVisible(bool $value = false): self { $this->isCommentVisible = $value; return $this; } public function isCommentVisible(): bool { return $this->isCommentVisible; } /** * @return string */ public function getSlideshowType(): string { return $this->slideshowType; } /** * @param string $value * * @return self */ public function setSlideshowType(string $value = self::SLIDESHOW_TYPE_PRESENT): self { if (\in_array($value, $this->arraySlideshowTypes)) { $this->slideshowType = $value; } return $this; } }