| 1 |
<?php |
<?php |
| 2 |
// $Id: views_handler_field_node.inc,v 1.3.2.3 2009/09/21 21:34:05 merlinofchaos Exp $ |
// $Id: views_handler_field_node.inc,v 1.3.2.4 2009/09/21 22:12:13 merlinofchaos Exp $ |
| 3 |
/** |
/** |
| 4 |
* @file |
* @file |
| 5 |
* Contains the basic 'node' field handler. |
* Contains the basic 'node' field handler. |
| 9 |
* Field handler to provide simple renderer that allows linking to a node. |
* Field handler to provide simple renderer that allows linking to a node. |
| 10 |
*/ |
*/ |
| 11 |
class views_handler_field_node extends views_handler_field { |
class views_handler_field_node extends views_handler_field { |
| 12 |
/** |
|
| 13 |
* Constructor to provide additional field to add. |
function init(&$view, $options) { |
| 14 |
*/ |
parent::init($view, $options); |
| 15 |
function construct() { |
if (!empty($this->options['link_to_node'])) { |
| 16 |
parent::construct(); |
$this->additional_fields['nid'] = 'nid'; |
| 17 |
$this->additional_fields['nid'] = 'nid'; |
if (module_exists('translation')) { |
| 18 |
if (module_exists('translation')) { |
$this->additional_fields['language'] = array('table' => 'node', 'field' => 'language'); |
| 19 |
$this->additional_fields['language'] = array('table' => 'node', 'field' => 'language'); |
} |
| 20 |
} |
} |
| 21 |
} |
} |
| 22 |
|
|