"File" ); /** * Return the value of this field for inclusion into things such as reports * * @return string */ public function getFormattedValue() { $link = $this->getLink(); $title = _t('SubmittedFileField.DOWNLOADFILE', 'Download File'); if($link) { return sprintf('%s', $link, $title); } return false; } /** * Return the link for the file attached to this submitted form field * * @return string */ public function getLink() { if($file = $this->UploadedFile()) { if(trim($file->getFilename(), '/') != trim(ASSETS_DIR,'/')) { return $this->UploadedFile()->URL; } } } }