function theme_track_da_files_file_formatter_table in Track da files 7
Same name and namespace in other branches
- 8 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.
1 theme call to theme_track_da_files_file_formatter_table()
- track_da_files_field_formatter_view in ./
track_da_files.module - Implements hook_field_formatter_view().
File
- includes/
track_da_files_formatter.inc, line 115 - format_custom_link_text 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,
));
}