You are here

function menu_position_menu_position_rule_pages_form_submit in Menu Position 7

Same name and namespace in other branches
  1. 6 plugins/menu_position.pages.inc \menu_position_menu_position_rule_pages_form_submit()
  2. 7.2 plugins/menu_position.pages.inc \menu_position_menu_position_rule_pages_form_submit()

Prepares the "node type" variables to be stored in the rule.

Parameters

$form: A reference to the "add/edit rule" form array.

$form_state: A reference to the current form state, including submitted values.

1 string reference to 'menu_position_menu_position_rule_pages_form_submit'
menu_position_menu_position_rule_pages_form in plugins/menu_position.pages.inc
Adds form elements for the "node type" plugin to the rule configuration form.

File

plugins/menu_position.pages.inc, line 73
Provides the "Pages" rule plugin for the Menu Position module.

Code

function menu_position_menu_position_rule_pages_form_submit(&$form, &$form_state) {

  // The user has added our plugin's form elements as a condition for the rule.
  if (!empty($form_state['values']['pages'])) {

    // Add this plugin's variables to the rule.
    $variables = array(
      'pages' => drupal_strtolower(trim($form_state['values']['pages'])),
    );
    $form_state['values']['conditions']['pages'] = $variables;
  }
}