You are here

public function MaillogHandlerFieldMaillogLinkDelete::render in Maillog / Mail Developer 7

Render the field.

Parameters

array $values: The values retrieved from the database.

Overrides views_handler_field::render

File

includes/MaillogHandlerFieldMaillogLinkDelete.php, line 35
Handler for providing a 'Delete link' in views.

Class

MaillogHandlerFieldMaillogLinkDelete
Handler for providing a 'Delete link' in views.

Code

public function render($values) {

  // Ensure user has access to edit this node.
  if (!user_access('delete maillog')) {
    return;
  }
  $text = !empty($this->options['text']) ? $this->options['text'] : t('delete');
  return l($text, "admin/reports/maillog/delete/{$values->id}", array(
    'query' => drupal_get_destination(),
  ));
}