You are here

public function views_handler_field_comment::init in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 modules/comment/views_handler_field_comment.inc \views_handler_field_comment::init()
  2. 6.2 modules/comment/views_handler_field_comment.inc \views_handler_field_comment::init()

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 18
Definition of views_handler_field_comment.

Class

views_handler_field_comment
Field handler to allow linking to a comment.

Code

public 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';
  }
}