function views_handler_field_node::render_link
Render whatever the data is as a link to the node.
Data should be made XSS safe prior to calling this function.
5 calls to views_handler_field_node::render_link()
- views_handler_field_history_user_timestamp::render in modules/
node/ views_handler_field_history_user_timestamp.inc - Render the field.
- views_handler_field_node::render in modules/
node/ views_handler_field_node.inc - Render the field.
- views_handler_field_node_language::render in modules/
locale/ views_handler_field_node_language.inc - Render the field.
- views_handler_field_node_revision::render_link in modules/
node/ views_handler_field_node_revision.inc - Render whatever the data is as a link to the node.
- views_handler_field_node_type::render in modules/
node/ views_handler_field_node_type.inc - Render the field.
1 method overrides views_handler_field_node::render_link()
- views_handler_field_node_revision::render_link in modules/
node/ views_handler_field_node_revision.inc - Render whatever the data is as a link to the node.
File
-
modules/
node/ views_handler_field_node.inc, line 61
Class
- views_handler_field_node
- Field handler to provide simple renderer that allows linking to a node.
Code
public function render_link($data, $values) {
if (!empty($this->options['link_to_node']) && !empty($this->additional_fields['nid'])) {
if ($data !== NULL && $data !== '') {
$this->options['alter']['make_link'] = TRUE;
$this->options['alter']['path'] = "node/" . $this->get_value($values, 'nid');
if (isset($this->aliases['language'])) {
$languages = language_list();
$language = $this->get_value($values, 'language');
if (isset($languages[$language])) {
$this->options['alter']['language'] = $languages[$language];
}
else {
unset($this->options['alter']['language']);
}
}
}
else {
$this->options['alter']['make_link'] = FALSE;
}
}
return $data;
}