You are here

function menu_position_menu_position_rule_user_page_form_submit in Menu Position 7

Prepares the plugin's 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_user_page_form_submit'
menu_position_menu_position_rule_user_page_form in plugins/menu_position.user_page.inc
Adds form elements for the User plugin to the rule configuration form.

File

plugins/menu_position.user_page.inc, line 87
Provides the User rule plugin for the Menu Position module.

Code

function menu_position_menu_position_rule_user_page_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']['user_page_enable'])) {
    $variables = array(
      'user_page_enable' => $form_state['values']['user_page_enable'],
    );
    $form_state['values']['conditions']['user_page'] = $variables;
  }
}