const TEXT_POPUP = 43;
const LOTTIE = 44;
const COPY_TO_CLIPBOARD = 45;
+ const SLIDESHOW_INLINE = 46;
protected static string|false|null $_linksKey = null;
return new InlineSlideshowLink($id, $init, $compiler);
}
return new ImageLink($id, $init, $compiler);
+ case static::SLIDESHOW_INLINE:
+ return new InlineSlideshowLink($id, $init, $compiler);
case static::FILE:
return new FileLink($id, $init, $compiler);
case static::AUDIO:
}
/**
- * @return int
+ * @return float
*/
public function getDelay(): float
{
use Cubist\Util\Files\Files;
use Cubist\Util\Graphics\Image;
use Cubist\Util\Xml;
-use Illuminate\Support\Facades\Log;
-class SlideshowLink extends NormalLink {
+class SlideshowLink extends NormalLink
+{
protected $path;
protected $path_absolute;
protected $baseName = '';
- public function getURL() {
+ public function getURL()
+ {
if (empty($this->to)) {
return '';
return '#/slideshow/' . $this->uid;
}
- public function getAdditionnalContent() {
- return 'data-slideshow="' . rawurlencode($this->generateSlideshow('popup')) . '" ';
+ public function getAdditionnalContent()
+ {
+ return parent::getAdditionnalContent() . ' data-slideshow="' . rawurlencode($this->generateSlideshow('popup')) . '" ';
}
- public function getDefaultTooltip() {
+ public function getDefaultTooltip()
+ {
return 'view slideshow';
}
/**
* @throws \Exception
*/
- public function generateSlideshow($context) {
+ public function generateSlideshow($context)
+ {
$this->compiler->addSlideshowLibrary($context === 'inline');
$this->allowed_extensions = ['jpg', 'png', 'jpeg', 'gif', 'svg'];
return $res;
}
- protected function _getSlidesFromDirectory($path) {
+ protected function _getSlidesFromDirectory($path)
+ {
$files = Files::getRecursiveDirectoryIterator($path);
$slides = [];
}
- protected function _slides($slides, $options = []) {
+ protected function _slides($slides, $options = [])
+ {
$default_options = [
'show_captions' => true,
'caption_size' => null,
}
- protected function _orderSlidesByFilename($a, $b) {
+ protected function _orderSlidesByFilename($a, $b)
+ {
return strcmp($a['path'], $b['path']);
}
- public function keep() {
+ public function keep()
+ {
return true;
}
}