You are here

public function fasttoggle_comment_views_handler_field_comment_link::render_link in Fasttoggle 7

Overrides views_handler_field_comment_link::render_link

1 call to fasttoggle_comment_views_handler_field_comment_link::render_link()
fasttoggle_comment_views_handler_field_comment_link::render in module/fasttoggle_comment/views/fasttoggle_comment_views_handler_field_comment_link.inc
Render the field.

File

module/fasttoggle_comment/views/fasttoggle_comment_views_handler_field_comment_link.inc, line 55

Class

fasttoggle_comment_views_handler_field_comment_link
Fasttoggle field views handler field comment link.

Code

public function render_link($comment, $values) {
  drupal_load('module', 'fasttoggle');
  $options = fasttoggle_get_allowed_links('comment', $comment, $comment->cid);
  $key = $this->fasttoggleKey;
  if (!empty($options['fields']['status']['instances'][$key])) {
    $link_info = fasttoggle($options, 'status', $key, $comment, FASTTOGGLE_FORMAT_LINK_ARRAY);
    $this->options['alter']['make_link'] = TRUE;
    $this->options['alter']['path'] = $link_info['href'];
    $this->options['alter']['text'] = $link_info['title'];
    $this->options['alter']['query'] = $link_info['query'];
    $this->options['alter']['link_class'] = implode(' ', $link_info['attributes']['class']);
    $this->options['alter']['title'] = $link_info['attributes']['title'];
    return $link_info['title'];
  }
}