1 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

core/modules/comment/views/views_handler_field_comment.inc, line 17
Definition of views_handler_field_comment.

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