1.20.x views_handler_field_comment.inc views_handler_field_comment::options_form(&$form, &$form_state)

Provide link-to-comment option

Overrides views_handler_field::options_form

File

modules/comment/views/views_handler_field_comment.inc, line 36
Definition of views_handler_field_comment.

Class

views_handler_field_comment
Field handler to allow linking to a comment.

Code

function options_form(&$form, &$form_state) {
  $form['link_to_comment'] = array(
    '#title' => t('Link this field to its comment'),
    '#description' => t("Enable to override this field's links."),
    '#type' => 'checkbox',
    '#default_value' => $this->options['link_to_comment'],
  );
  $form['link_to_node'] = array(
    '#title' => t('Link field to the node if there is no comment.'),
    '#type' => 'checkbox',
    '#default_value' => $this->options['link_to_node'],
  );
  parent::options_form($form, $form_state);
}