Example #1
0
 private function getTemplatePreviewPhotos(Uploads $model)
 {
     $filePath = Article::getUploadPhotosUrl() . $model->ref . '/thumbnail/' . $model->real_filename;
     $isImage = $this->isImage($filePath);
     if ($isImage) {
         $file = Html::img($filePath, ['class' => 'file-preview-image', 'alt' => $model->file_name, 'title' => $model->file_name]);
     } else {
         $file = "<div class='file-preview-other'> " . "<h2><i class='glyphicon glyphicon-file'></i></h2>" . "</div>";
     }
     return $file;
 }