function theme_file_entity_file_link

cis7 file_entity.theme.inc theme_file_entity_file_link($variables)
cle7 file_entity.theme.inc theme_file_entity_file_link($variables)
elmsmedia7 file_entity.theme.inc theme_file_entity_file_link($variables)
icor7 file_entity.theme.inc theme_file_entity_file_link($variables)
meedjum_blog7 file_entity.theme.inc theme_file_entity_file_link($variables)
mooc7 file_entity.theme.inc theme_file_entity_file_link($variables)

Copy of theme_file_file_link() for linking to the view file page.

See also

theme_file_file_link()

1 string reference to the theme hook from theme_file_entity_file_link()

Note: this list is generated by looking for the string for this theme hook, so it may include some references that are not actually using this theme hook.

file_entity_theme in sites/all/modules/ulmus/file_entity/file_entity.module
Implements hook_theme().

File

sites/all/modules/ulmus/file_entity/file_entity.theme.inc, line 13
Theme callbacks for the file entity module.

Code

function theme_file_entity_file_link($variables) {
  $file = $variables['file'];
  $icon_directory = $variables['icon_directory'];

  $url = 'file/' . $file->fid;
  $icon = theme('file_icon', array('file' => $file, 'icon_directory' => $icon_directory));

  // Set options as per anchor format described at
  // http://microformats.org/wiki/file-format-examples
  $options = array(
    'attributes' => array(
      'type' => $file->filemime . '; length=' . $file->filesize,
    ),
  );

  // Use the description as the link text if available.
  if (empty($file->description)) {
    $link_text = $file->filename;
  }
  else {
    $link_text = $file->description;
    $options['attributes']['title'] = check_plain($file->filename);
  }

  return '<span class="file">' . $icon . ' ' . l($link_text, $url, $options) . '</span>';
}
Error | ELMSLN API

Error

×

Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/elmsln_community/api.elmsln.org/includes/common.inc:2791) in drupal_send_headers() (line 1499 of /var/www/html/elmsln_community/api.elmsln.org/includes/bootstrap.inc).
  • Error: Call to undefined function apc_delete() in DrupalAPCCache->clear() (line 289 of /var/www/html/elmsln_community/api.elmsln.org/sites/all/modules/apc/drupal_apc_cache.inc).
The website encountered an unexpected error. Please try again later.