function activity_views_handler_field_activity_link_delete::render in Activity 7
Render the field.
Parameters
array $values: The values retrieved from the database.
Overrides views_handler_field::render
File
- views/
views_handler_fields.inc, line 56 - Provides the Views Field Handlers.
Class
- activity_views_handler_field_activity_link_delete
- Presents a link to delete an activity.
Code
function render($values) {
if (activity_delete_access($values->{$this->field_alias})) {
$text = !empty($this->options['text']) ? $this->options['text'] : t('delete');
return l($text, "activity/" . $values->{$this->field_alias} . "/delete", array(
'query' => drupal_get_destination(),
));
}
else {
return;
}
}