/** * Checks if asset file and thumbnails exist in filesystem. * * @param string $folder asset folder (relative path) * @param string $file asset filename * @param boolean $check_thumbs check existence/non-existence of thumbnail files * @param boolean $exist true=must exist, false=must not exist * * @return lyMediaTestFunctional current lyMediaTestFunctional instance */ protected function checkFile($folder, $file, $check_thumbs = true, $exist = true) { $file_path = lyMediaTools::getBasePath() . $folder . $file; $this->test()->is(is_file($file_path), $exist, 'File ' . $folder . $file . ($exist ? ' has ' : ' has not ') . 'been found'); if ($check_thumbs) { foreach (lyMediaTools::getThumbnailSettings() as $key => $params) { $file_path = lyMediaTools::getThumbnailPath($folder, $file, $key, false); $this->test()->is(is_file($file_path), $exist, 'Thumbnail ' . $key . '_' . $file . ($exist ? ' has ' : ' has not ') . 'been found'); } } return $this; }
<div class="lymedia_asset"> <div class="lymedia_asset_frame"> <?php if ($popup) { ?> <div class="lymedia_popup_info"> <span> <?php echo image_path(lyMediaTools::getAssetURI($asset)); ?> </span> <?php foreach (lyMediaTools::getThumbnailSettings() as $type => $params) { ?> <span class="<?php echo $type; ?> "> <?php echo thumbnail_image_path($asset, $folder->getRelativePath(), $type); ?> </span> <?php } ?> </div> <?php } ?> <?php echo thumbnail_image_tag($asset, $folder->getRelativePath(), 'small', 'alt=asset title=' . $asset->getTitle());