function theme_download_file_direct_download_item_accessible in DownloadFile 7.3
Same name and namespace in other branches
- 6 download_file.formatter.inc \theme_download_file_direct_download_item_accessible()
- 7 download_file.formatter.inc \theme_download_file_direct_download_item_accessible()
- 7.2 download_file.formatter.inc \theme_download_file_direct_download_item_accessible()
Theme function for the 'direct_download_accessible' multiple file formatter.
Parameters
$variables:
Return value
string A string containing the HTML output.
1 theme call to theme_download_file_direct_download_item_accessible()
- theme_download_file_formatter_direct_download_accessible in ./
download_file.formatter.inc - Theming function for displaying the link accessible to direct download the file.
File
- ./
download_file.formatter.inc, line 174
Code
function theme_download_file_direct_download_item_accessible($variables) {
$file = $variables['file'];
// Views may call this function with a NULL value, return an empty string.
if (empty($file->fid)) {
return '';
}
$url = download_file_path($file->fid);
$accessibility = theme('download_file_detail_accessible', array(
'file' => $file,
));
$options['html'] = TRUE;
// Use the description or the title as the link text if available.
if (empty($file->description) && empty($file->title)) {
$link_text = $file->filename;
}
else {
if (!empty($file->description)) {
$link_text = $file->description;
}
elseif (!empty($file->title)) {
$link_text = $file->title;
}
$options['attributes']['title'] = $file->filename;
}
return '<li>' . l($link_text . ' ' . $accessibility, $url, $options) . '</li>';
}