You are here

function content_handler_field_multiple::render_link in Brightcove Video Connect 6

Same name and namespace in other branches
  1. 6.2 brightcove_cck/views/content_handler_field_multiple.inc \content_handler_field_multiple::render_link()
4 calls to content_handler_field_multiple::render_link()
brightcove_cck_handler_field_video_date_multiple::render in brightcove_cck/views/brightcove_cck_handler_field_video_date_multiple.inc
brightcove_cck_handler_field_video_multiple::render in brightcove_cck/views/brightcove_cck_handler_field_video_multiple.inc
brightcove_cck_handler_field_video_tags_multiple::render in brightcove_cck/views/brightcove_cck_handler_field_video_tags_multiple.inc
content_handler_field_multiple::render in brightcove_cck/views/content_handler_field_multiple.inc

File

brightcove_cck/views/content_handler_field_multiple.inc, line 275
An extended subclass for field handling that adds multiple field grouping.

Class

content_handler_field_multiple
@file An extended subclass for field handling that adds multiple field grouping.

Code

function render_link($data, $values) {
  if (!$this->defer_query) {
    return parent::render_link($data, $values);
  }
  if (!empty($this->options['link_to_node']) && $data !== NULL && $data !== '') {
    if (method_exists('render_as_link', 'views_handler_field')) {

      // Views 2.3+
      $this->options['alter']['make_link'] = TRUE;
      $this->options['alter']['path'] = "node/" . $values->{$this->aliases['nid']};
    }
    else {

      // Views up to 2.2
      return l($data, "node/" . $values->nid, array(
        'html' => TRUE,
      ));
    }
  }
  else {
    return $data;
  }
}