You are here

function menu_node_views_argument_nid::options_form in Menu Node Views 7.2

Same name and namespace in other branches
  1. 6 includes/menu_node_views_argument_nid.inc \menu_node_views_argument_nid::options_form()
  2. 7 includes/menu_node_views_argument_nid.inc \menu_node_views_argument_nid::options_form()

Build the options form.

Overrides views_handler_argument_numeric::options_form

File

includes/menu_node_views_argument_nid.inc, line 14

Class

menu_node_views_argument_nid
Argument handler to accept a node id that is menu-sensitive.

Code

function options_form(&$form, &$form_state) {
  parent::options_form($form, $form_state);
  $form['depth'] = array(
    '#type' => 'select',
    '#title' => t('Depth'),
    '#options' => drupal_map_assoc(array(
      1,
      2,
      3,
      4,
      5,
      6,
      7,
      8,
      9,
    )),
    '#default_value' => $this->options['depth'],
    '#description' => t('The depth will match nodes tagged with terms in the hierarchy. For example, if you have the term "fruit" and a child term "apple", with a depth of 1 (or higher) then filtering for the term "fruit" will get nodes that are tagged with "apple" as well as "fruit". If negative, the reverse is true; searching for "apple" will also pick up nodes tagged with "fruit" if depth is -1 (or lower).'),
  );
  unset($form['break_phrase']);
}