You are here

function views_plugin_row_node_view_split::options_form in Views nodes split 7

Same name and namespace in other branches
  1. 6 plugins/views_plugin_row_node_view_split.inc \views_plugin_row_node_view_split::options_form()

Provide a form for setting options.

Overrides views_plugin_row_node_view::options_form

File

plugins/views_plugin_row_node_view_split.inc, line 27
Contains the node row plugin.

Class

views_plugin_row_node_view_split
Plugin which performs a node_view on the resulting object.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $options = $this
    ->options_form_summary_options();
  $form['first_settings'] = array(
    '#type' => 'fieldset',
    '#title' => t('Split settings'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $form['first_settings']['first_x_value'] = array(
    '#type' => 'textfield',
    '#title' => t('Split limit'),
    '#description' => t('The results that are situated before or at this limit will have a different view mode.'),
    '#default_value' => $this->options['first_settings']['first_x_value'],
  );
  $form['first_settings']['view_mode'] = array(
    '#type' => 'select',
    '#options' => $options,
    '#title' => t('View mode'),
    '#default_value' => $this->options['first_settings']['view_mode'],
  );
  $form['first_settings']['links'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display links'),
    '#default_value' => $this->options['first_settings']['links'],
  );
  $form['first_settings']['comments'] = array(
    '#type' => 'checkbox',
    '#title' => t('Display comments'),
    '#default_value' => $this->options['first_settings']['comments'],
  );
}