1 views_handler_field_file_link_edit.inc | views_handler_field_file_link_edit::render_link(File $file, $values) |
Renders the link.
File
- core/
modules/ file/ views/ views_handler_field_file_link_edit.inc, line 42 - Definition of views_handler_field_file_link_edit.
Class
- views_handler_field_file_link_edit
- Field handler to present a link to manage a file.
Code
function render_link(File $file, $values) {
// Ensure user has access to edit this file.
if (!$file->access('update')) {
return;
}
$this->options['alter']['make_link'] = TRUE;
$this->options['alter']['path'] = "file/$file->fid/manage";
$this->options['alter']['query'] = backdrop_get_destination();
$text = !empty($this->options['text']) ? $this->options['text'] : t('Manage');
return $text;
}