You are here

function Mail::render_link in Views (for Drupal 7) 8.3

Overrides User::render_link

File

lib/Views/user/Plugin/views/field/Mail.php, line 45
Definition of Views\user\Plugin\views\field\Mail.

Class

Mail
Field handler to provide acess control for the email field.

Namespace

Views\user\Plugin\views\field

Code

function render_link($data, $values) {
  parent::render_link($data, $values);
  if ($this->options['link_to_user'] == 'mailto') {
    $this->options['alter']['make_link'] = TRUE;
    $this->options['alter']['path'] = "mailto:" . $data;
  }
  return $data;
}