Ejemplo n.º 1
0
 /**
  * Get a thumbnail URL for user uploaded files. This does not work for template
  * images.
  * 
  * @param string $relativePath
  * @param array $thumbParams
  * @return string URL to thumbnail
  */
 public static function thumb($relativePath, $thumbParams = array("lw" => 100, "ph" => 100, "zc" => 1))
 {
     $file = new \GO\Base\Fs\File(\GO::config()->file_storage_path . $relativePath);
     $thumbParams['filemtime'] = $file->mtime();
     $thumbParams['src'] = $relativePath;
     return \Site::urlManager()->createUrl('site/front/thumb', $thumbParams);
 }