method getThumbsSizes documentation in bbn\Appui\Medias

function($media, $exists = true) { if (is_string($media)) { $media = $this->getMedia($media); } if (!is_array($media)) { throw new Exception("Impossible to find the media in the database"); } if (empty($media['file'])) { throw new Exception("Impossible to retrieve the path"); } $cfg = $this->getThumbsSizesByType($media['type']); $res = []; foreach ($cfg['thumbs'] as $thumb) { $size = [ empty($thumb['width']) ? false : $thumb['width'], empty($thumb['height']) ? false : $thumb['height'], X::hasProps($thumb, ['width', 'height', 'crop'], true) ? true : false ]; if (!$exists || $this->fs->exists($this->getThumbPath($media['file'], $size))) { $res[] = $size; } } return $res; }

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.