method getThumbsSizes documentation in bbn\Appui\Medias

function($media) { if (!is_array($media)) { $media = $this->getMedia($media); } if (!is_array($media)) { throw new Exception("Impossible to find the media in the database"); } if (!($path = $this->getPath($media))) { throw new Exception("Impossible to retrieve the path"); } $list = $this->fs->getFiles(X::dirname($path)); if (count($list) > 1) { $sizes = []; foreach ($list as $l) { preg_match('/.*\_w([0-9]*)\.[a-zA-Z]*$/', $l, $m); if (!empty($m) && !empty($m[1])) { $sizes[] = (int)$m[1]; } } sort($sizes); return $sizes; } return []; }

BBN is a suite of PHP and JS libraries and VueJS components - all open-source! bbn.io, build applications, the quick way

This website uses cookies to ensure you get the best experience on our website.