config_menu($reaction_path); $items[$reaction_path] = array( 'title' => 'Rules', 'type' => MENU_DEFAULT_LOCAL_TASK, 'weight' => -1, ); $items[$reaction_path . '/add'] = array( 'title' => 'Add new rule', 'page callback' => 'drupal_get_form', 'page arguments' => array('rules_admin_add_reaction_rule', $reaction_path), 'access arguments' => array('administer rules'), 'type' => MENU_LOCAL_ACTION, 'file' => 'rules_admin.inc', 'weight' => 0, ); $items[$reaction_path . '/import'] = array( 'title' => 'Import rule', 'page callback' => 'drupal_get_form', 'page arguments' => array('rules_ui_import_form', $reaction_path), 'access arguments' => array('administer rules'), 'file' => 'ui/ui.forms.inc', 'file path' => drupal_get_path('module', 'rules'), 'type' => MENU_LOCAL_ACTION, ); // Components UI menu entries. $component_path = 'admin/config/workflow/rules/components'; $items += rules_ui()->config_menu($component_path); $items[$component_path] = array( 'title' => 'Components', 'page callback' => 'drupal_get_form', 'page arguments' => array('rules_admin_components_overview', $component_path), 'access arguments' => array('administer rules'), 'type' => MENU_LOCAL_TASK, 'file' => 'rules_admin.inc', 'weight' => 0, ); $items[$component_path . '/add'] = array( 'title' => 'Add new component', 'page callback' => 'drupal_get_form', 'page arguments' => array('rules_admin_add_component', $component_path), 'access arguments' => array('administer rules'), 'type' => MENU_LOCAL_ACTION, 'file' => 'rules_admin.inc', 'weight' => 0, ); $items[$component_path . '/import'] = array( 'title' => 'Import component', 'page callback' => 'drupal_get_form', 'page arguments' => array('rules_ui_import_form', $component_path), 'access arguments' => array('administer rules'), 'file' => 'ui/ui.forms.inc', 'file path' => drupal_get_path('module', 'rules'), 'type' => MENU_LOCAL_ACTION, ); // Some general rules admin menu items. $items['admin/config/workflow/rules'] = array( 'title' => 'Rules', 'position' => 'right', 'page callback' => 'drupal_get_form', 'page arguments' => array('rules_admin_reaction_overview', $reaction_path), 'description' => 'Manage reaction rules and rule components.', 'access arguments' => array('administer rules'), 'file' => 'rules_admin.inc', ); $items['admin/config/workflow/rules/settings'] = array( 'title' => 'Settings', 'page callback' => 'drupal_get_form', 'page arguments' => array('rules_admin_settings'), 'access arguments' => array('administer rules'), 'type' => MENU_LOCAL_TASK, 'file' => 'rules_admin.inc', 'weight' => 1, ); return $items; }