You are here

function filefield_token_list in FileField 6.2

Same name and namespace in other branches
  1. 5.2 filefield.module \filefield_token_list()
  2. 6.3 filefield.token.inc \filefield_token_list()

Implementation of hook_token_list(): Provide a user readable list of filefield tokens.

File

./filefield.module, line 908

Code

function filefield_token_list($type = 'all') {
  if ($type == 'field' || $type == 'all') {
    $tokens = array();
    $tokens['file']['fid'] = t("File ID");
    $tokens['file']['description'] = t("File description");
    $tokens['file']['filename'] = t("File name");
    $tokens['file']['filepath'] = t("File path");
    $tokens['file']['filemime'] = t("File MIME type");
    $tokens['file']['filesize'] = t("File size (in bytes)");
    $tokens['file']['filesize_formatted'] = t("File size (pretty printed)");
    $tokens['file']['view'] = t("Fully formatted HTML file tag");
    return $tokens;
  }
}