function customfilter_menu in Custom filter 6
Same name and namespace in other branches
- 5 customfilter.module \customfilter_menu()
- 7.2 customfilter.module \customfilter_menu()
- 7 customfilter.module \customfilter_menu()
Implements hook_menu().
File
- ./
customfilter.module, line 126 - Allows the users with the right permission to define custom filters.
Code
function customfilter_menu() {
$access = array(
'administer customfilter',
);
$items = array();
$items['admin/settings/customfilter'] = array(
'title' => 'Custom filters',
'description' => 'Allow the users to define custom filters.',
'page callback' => 'customfilter_settings',
'access arguments' => $access,
'file' => 'customfilter.admin.inc',
);
$items['admin/settings/customfilter/list'] = array(
'title' => 'Filters',
'access arguments' => $access,
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -1,
);
$items['admin/settings/customfilter/add'] = array(
'title' => 'Add filter',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'customfilter_filter_add',
),
'access arguments' => $access,
'file' => 'customfilter.admin.inc',
'type' => MENU_LOCAL_TASK,
);
$items['admin/settings/customfilter/tools'] = array(
'title' => 'Tools',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'customfilter_export_form',
),
'access arguments' => $access,
'file' => 'customfilter.admin.inc',
'type' => MENU_LOCAL_TASK,
);
$items['admin/settings/customfilter/tools/export'] = array(
'title' => 'Export',
'access arguments' => $access,
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['admin/settings/customfilter/tools/import'] = array(
'title' => 'Import',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'customfilter_import_form',
),
'access arguments' => $access,
'file' => 'customfilter.admin.inc',
'type' => MENU_LOCAL_TASK,
);
$items['admin/settings/customfilter/%'] = array(
'title' => 'Rules',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'customfilter_rules_form',
3,
),
'access arguments' => $access,
'file' => 'customfilter.admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/settings/customfilter/%/list'] = array(
'title' => 'List rules',
'access arguments' => $access,
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -1,
);
$items['admin/settings/customfilter/%/edit'] = array(
'title' => 'Edit filter',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'customfilter_filter_edit',
3,
),
'access arguments' => $access,
'file' => 'customfilter.admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/settings/customfilter/%/delete'] = array(
'title' => 'Delete filter',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'customfilter_filter_delete',
3,
),
'access arguments' => $access,
'file' => 'customfilter.admin.inc',
'type' => MENU_CALLBACK,
'weight' => 2,
);
$items['admin/settings/customfilter/%/add'] = array(
'title' => 'Add rule',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'customfilter_rule_edit',
'add',
3,
),
'access arguments' => $access,
'file' => 'customfilter.admin.inc',
'type' => MENU_LOCAL_TASK,
'weight' => 4,
);
$items['admin/settings/customfilter/%/%'] = array(
'title' => 'Edit rule',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'customfilter_rule_edit',
'edit',
3,
4,
),
'access arguments' => $access,
'file' => 'customfilter.admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/settings/customfilter/%/%/edit'] = array(
'title' => 'Edit rule',
'access arguments' => $access,
'type' => MENU_CALLBACK,
'weight' => -1,
);
$items['admin/settings/customfilter/%/%/delete'] = array(
'title' => 'Delete rule',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'customfilter_rule_delete',
4,
),
'access arguments' => $access,
'file' => 'customfilter.admin.inc',
'type' => MENU_CALLBACK,
);
$items['admin/settings/customfilter/%/%/add'] = array(
'title' => 'Add subrule',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'customfilter_rule_edit',
'add',
3,
4,
),
'access arguments' => $access,
'file' => 'customfilter.admin.inc',
'type' => MENU_CALLBACK,
);
return $items;
}