You are here

public function views_plugin_row_node_view::options_form in Views (for Drupal 7) 7.3

Same name and namespace in other branches
  1. 6.3 modules/node/views_plugin_row_node_view.inc \views_plugin_row_node_view::options_form()
  2. 6.2 modules/node/views_plugin_row_node_view.inc \views_plugin_row_node_view::options_form()

Provide a form for setting options.

Overrides views_plugin_row::options_form

File

modules/node/views_plugin_row_node_view.inc, line 63
Definition of views_plugin_row_node_view.

Class

views_plugin_row_node_view
Plugin which performs a node_view on the resulting object.

Code

public function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $options = $this
    ->options_form_summary_options();
  $form['view_mode'] = array(
    '#type' => 'select',
    '#options' => $options,
    '#title' => t('View mode'),
    '#default_value' => $this->options['view_mode'],
  );
  $form['links'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display links'),
    '#default_value' => $this->options['links'],
  );
  $form['comments'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display comments'),
    '#default_value' => $this->options['comments'],
    '#access' => module_exists('comment'),
  );
}