function sheetnode_phpexcel_menu in Sheetnode 6
Same name and namespace in other branches
- 5 modules/sheetnode_phpexcel/sheetnode_phpexcel.module \sheetnode_phpexcel_menu()
- 7.2 modules/sheetnode_phpexcel/sheetnode_phpexcel.module \sheetnode_phpexcel_menu()
- 7 modules/sheetnode_phpexcel/sheetnode_phpexcel.module \sheetnode_phpexcel_menu()
Implementation of hook_menu().
File
- modules/
sheetnode_phpexcel/ sheetnode_phpexcel.module, line 155
Code
function sheetnode_phpexcel_menu() {
$items = array();
foreach (sheetnode_phpexcel_get_plugins('output') as $format => $plugin) {
$items["sheetnode/{$format}/%node"] = array(
'title' => 'Save as !format',
'title arguments' => array(
'!format' => $plugin['short-name'],
),
'access arguments' => array(
'access content',
),
'page callback' => '_sheetnode_phpexcel_export',
'page arguments' => array(
$format,
2,
),
'type' => MENU_CALLBACK,
'file' => 'sheetnode_phpexcel.export.inc',
);
}
$items['sheetnode/export/ready'] = array(
'title' => 'Spreadsheet exported',
'access callback' => '_sheetnode_phpexcel_export_access',
'page callback' => 'theme',
'page arguments' => array(
'sheetnode_phpexcel_export_ready',
),
'type' => MENU_CALLBACK,
'file' => 'sheetnode_phpexcel.export.inc',
);
$items['sheetnode/export/download'] = array(
'title' => 'Download spreadsheet file',
'access callback' => '_sheetnode_phpexcel_export_access',
'page callback' => '_sheetnode_phpexcel_export_download',
'type' => MENU_CALLBACK,
'file' => 'sheetnode_phpexcel.export.inc',
);
foreach (sheetnode_phpexcel_get_plugins('input') as $format => $plugin) {
$items["node/add/{$format}"] = array(
'title' => 'Sheetnode import from !format',
'title arguments' => array(
'!format' => $plugin['short-name'],
),
'access arguments' => array(
'create sheetnode',
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'_sheetnode_phpexcel_import_form',
$format,
),
'description' => 'Create a new sheetnode with content from an existing spreadsheet.',
'file' => 'sheetnode_phpexcel.import.inc',
);
}
$items['admin/settings/sheetnode/phpexcel'] = array(
'title' => 'PHPExcel',
'access arguments' => array(
'administer site configuration',
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'_sheetnode_phpexcel_settings',
),
'description' => 'Administer settings for Sheetnode PHPExcel.',
'type' => MENU_LOCAL_TASK,
);
return $items;
}