function views_handler_field_comment::init
3.x views_handler_field_comment.inc | views_handler_field_comment::init(&$view, &$options) |
2.x views_handler_field_comment.inc | views_handler_field_comment::init(&$view, &$options) |
Override init function to provide generic option to link to comment.
Overrides views_handler_field::init
File
- modules/
comment/ views_handler_field_comment.inc, line 9
Class
- views_handler_field_comment
- Field handler to allow linking to a comment
Code
function init(&$view, &$options) {
parent::init($view, $options);
if (!empty($this->options['link_to_comment'])) {
$this->additional_fields['cid'] = 'cid';
$this->additional_fields['nid'] = 'nid';
}
}