You are here

public function filedepot::getFileIcon in filedepot 6

Same name and namespace in other branches
  1. 7 filedepot.class.php \filedepot::getFileIcon()

File

./filedepot.class.php, line 632
filedepot.class.php Main class for the Filedepot module

Class

filedepot
@file filedepot.class.php Main class for the Filedepot module

Code

public function getFileIcon($fname) {
  $ext = end(explode(".", $fname));
  if (array_key_exists($ext, $this->iconmap)) {
    $icon = $this->iconmap[$ext];
  }
  else {
    $icon = $this->iconmap['default'];
  }
  return $icon;
}