/**
  * Generate thumbnail url
  *
  * @return string
  */
 public function getPreviewURL()
 {
     // Get preview from file
     if ($this->file) {
         return $this->getFilePreviewURL();
     }
     // Generate default icon html
     return File::get_icon_for_extension($this->getExtension());
 }
 /**
  * Return the relative URL of an icon for the file type,
  * based on the {@link appCategory()} value.
  * Images are searched for in "framework/images/app_icons/".
  *
  * @return string URL to icon
  */
 public function getIcon()
 {
     $filename = $this->getFilename();
     $ext = pathinfo($filename, PATHINFO_EXTENSION);
     return \File::get_icon_for_extension($ext);
 }