function filefield_token_list in FileField 6.3
Same name and namespace in other branches
- 5.2 filefield.module \filefield_token_list()
- 6.2 filefield.module \filefield_token_list()
Implementation of hook_token_list().
Provide a user readable list of FileField tokens.
File
- ./
filefield.token.inc, line 13 - Token hook implementations. Included if token.module is installed.
Code
function filefield_token_list($type = 'all') {
if ($type == 'field' || $type == 'all') {
$tokens = array();
$tokens['file']['filefield-fid'] = t('File ID');
$tokens['file']['filefield-description'] = t('File description');
$tokens['file']['filefield-filename'] = t('File name');
$tokens['file']['filefield-filepath'] = t('File path');
$tokens['file']['filefield-fileurl'] = t('File URL');
$tokens['file']['filefield-filemime'] = t('File MIME type');
$tokens['file']['filefield-filesize'] = t('File size (in bytes)');
$tokens['file']['filefield-filesize_formatted'] = t('File size (pretty printed)');
$tokens['file']['filefield-view'] = t('Fully formatted HTML file tag');
$tokens['file']['filefield-onlyname'] = t('File name without extension');
$tokens['file']['filefield-extension'] = t('File extension');
return $tokens;
}
}