function state_flow_menu in State Machine 7
Same name and namespace in other branches
- 6 modules/state_flow/state_flow.module \state_flow_menu()
- 7.3 modules/state_flow/state_flow.module \state_flow_menu()
- 7.2 modules/state_flow/state_flow.module \state_flow_menu()
Implements hook_menu().
File
- modules/
state_flow/ state_flow.module, line 12 - An implementation of node revision workflow for Drupal based on the State Machine system.
Code
function state_flow_menu() {
$items = array();
$items['node/%node/workflow'] = array(
'title' => 'Workflow',
'description' => 'Information about the workflow status of this content',
'type' => MENU_LOCAL_TASK,
'page callback' => 'state_flow_events',
'page arguments' => array(
1,
),
'access callback' => 'state_flow_menu_node_access',
'access arguments' => array(
1,
),
'weight' => 10,
'file' => 'state_flow.pages.inc',
);
$items['node/%node/revisions/%/edit'] = array(
'title' => 'Edit an earlier revision',
'load arguments' => array(
3,
),
'page callback' => 'node_page_edit',
'page arguments' => array(
1,
TRUE,
),
'access callback' => 'node_access',
'access arguments' => array(
'update',
1,
),
'file' => 'node.pages.inc',
'file path' => drupal_get_path('module', 'node'),
);
$items['node/%node/revisions/%/workflow'] = array(
'title' => 'Transition a revision to a new workflow state',
'load arguments' => array(
3,
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'state_flow_events_revision',
1,
5,
),
'access callback' => 'state_flow_events_revisions_access',
'access arguments' => array(
1,
5,
),
'file' => 'state_flow.pages.inc',
);
return $items;
}