function theme_track_da_files_file_formatter_table in Track da files 8
Same name and namespace in other branches
- 7 includes/track_da_files_formatter.inc \theme_track_da_files_file_formatter_table()
Returns HTML for a file attachments table.
Parameters
array $variables: An associative array containing:
- items: An array of file attachments.
File
- includes/
track_da_files_formatter.inc, line 91 - This file contains the specialized field formatters.
Code
function theme_track_da_files_file_formatter_table($variables) {
$header = array(
t('Attachment'),
t('Size'),
);
$rows = array();
foreach ($variables['items'] as $delta => $item) {
$rows[] = array(
theme('track_da_files_file_link', array(
'file' => (object) $item,
)),
format_size($item['filesize']),
);
}
return empty($rows) ? '' : theme('table', array(
'header' => $header,
'rows' => $rows,
));
}