You are here

function _scald_file_get_default_icon in Scald File Provider 7

Get the default icon.

Parameters

object $file: The file.

Return value

string The file's path.

1 call to _scald_file_get_default_icon()
scald_file_scald_fetch in ./scald_file.module
Implements hook_scald_fetch().

File

./scald_file.module, line 239
Scald File is a Scald Atom Provider for Files.

Code

function _scald_file_get_default_icon($file) {
  $name = str_replace(array(
    '/',
    '-',
  ), array(
    '_',
    '_',
  ), $file->filemime);
  $path = drupal_get_path('module', 'scald_file') . '/icons/' . $name . '.png';
  drupal_alter('scald_file_icon', $path, $name, $file);
  return $path;
}