You are here

function panelizer_handler_field_node_link::render_link in Panelizer 7

Same name and namespace in other branches
  1. 6 plugins/views/panelizer_handler_field_node_link.inc \panelizer_handler_field_node_link::render_link()

Overrides views_handler_field_node_link::render_link

File

plugins/views/panelizer_handler_field_node_link.inc, line 42

Class

panelizer_handler_field_node_link
Views field handler for rendering node links that point to panelizer tabs.

Code

function render_link($data, $values) {
  $this->options['alter']['make_link'] = TRUE;
  $tab_path = $this->options['panelizer_tab'];
  $path = 'node/' . $data . '/' . $tab_path;
  $this->options['alter']['path'] = $path;
  $this->options['alter']['query'] = drupal_get_destination();
  $text = !empty($this->options['text']) ? $this->options['text'] : $this->tab_map[$tab_path];
  return $text;
}