function rules_forms_menu in Rules Forms Support 7.2
Same name and namespace in other branches
- 7 rules_forms.module \rules_forms_menu()
Implements hook_menu().
File
- ./
rules_forms.module, line 43 - Rules Forms Support provides events, conditions, and actions for site forms.
Code
function rules_forms_menu() {
// Keep track of what would be the last argument number offset for
// RULES_FORMS_ADMIN_PATH when used as page/access arguments.
$arguments_offset = count(explode('/', RULES_FORMS_ADMIN_PATH)) - 1;
$items = array();
$items[RULES_FORMS_ADMIN_PATH] = array(
'title' => 'Forms Support',
'description' => 'Manage Rules Forms events, forms, and form element information.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'rules_forms_admin_events',
),
'access arguments' => array(
'administer rules forms',
),
'type' => MENU_LOCAL_TASK,
'weight' => 1,
'file' => 'includes/rules_forms.admin.inc',
);
$items[RULES_FORMS_ADMIN_PATH . '/%/activate/%'] = array(
'title' => 'Activate events for a form',
'type' => MENU_CALLBACK,
'page callback' => 'rules_forms_activate',
'page arguments' => array(
$arguments_offset + 1,
$arguments_offset + 3,
),
'access arguments' => array(
'administer rules forms',
),
'file' => 'includes/rules_forms.admin.inc',
);
return $items;
}