You are here

function nodereferrer_view_handler_relationship::options_form in NodeReferrer 7

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

Provide the label widget that all fields should have.

Overrides views_handler_relationship::options_form

File

views/nodereferrer_view_handler_relationship.inc, line 27
nodereferrer.module Views integration

Class

nodereferrer_view_handler_relationship
@file nodereferrer.module Views integration

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['referrer_field'] = array(
    '#type' => 'select',
    '#title' => t('Using field'),
    '#options' => nodereferrer_nodereference_field_options(),
    '#default_value' => empty($this->options['referrer_field']) ? array() : $this->options['referrer_field'],
  );
  $options = array(
    '-1' => t('All'),
  );
  for ($i = 0; $i < 10; $i++) {
    $options[$i] = $i + 1;
  }
  $form['referrer_delta'] = array(
    '#type' => 'select',
    '#options' => $options,
    '#default_value' => $this->options['referrer_delta'],
    '#title' => t('Delta'),
    '#description' => t('The delta allows you to select which item in a multiple value field to key the relationship off of. Select "1" to use the first item, "2" for the second item, and so on. If you select "All", each item in the field will create a new row, which may appear to cause duplicates.'),
  );
}