function swftools_menu in SWF Tools 6.3
Same name and namespace in other branches
- 5 swftools.module \swftools_menu()
- 6 swftools.module \swftools_menu()
- 6.2 swftools.module \swftools_menu()
Implementation of hook_menu().
File
- ./
swftools.module, line 135 - The primary component of SWF Tools that enables comprehensive media handling.
Code
function swftools_menu() {
// Reset methods cache
$methods = swftools_get_methods('', TRUE);
// Should this be administer swf tools?
$swf_admin = array(
'administer flash',
);
$items['admin/settings/swftools'] = array(
'title' => 'SWF Tools',
'description' => 'Settings to control how SWF Tools integrates with Adobe Flash related methods and tools like video players, MP3 players and image viewers.',
'access arguments' => $swf_admin,
'page callback' => 'system_admin_menu_block_page',
'file' => 'system.admin.inc',
'file path' => drupal_get_path('module', 'system'),
);
$items['admin/settings/swftools/handling'] = array(
'title' => 'File handling',
'description' => 'Configure how SWF Tools should handle different types of file.',
'access arguments' => $swf_admin,
'weight' => -2,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'swftools_admin_handling_form',
),
'file' => 'includes/swftools.admin.inc',
);
$items['swftools/playlist/%'] = array(
'title' => 'SWF Tools playlist',
'page callback' => 'swftools_get_xml',
'page arguments' => array(
2,
),
'access arguments' => array(
'access content',
),
'type' => MENU_CALLBACK,
);
$items['swftools/page/%'] = array(
'title' => 'SWF Tools',
'page callback' => 'swftools_get_html',
'page arguments' => array(
2,
),
'access arguments' => array(
'access content',
),
'type' => MENU_CALLBACK,
);
$items['admin/settings/swftools/embed'] = array(
'title' => 'Embedding settings',
'description' => 'Set the embedding method that SWF Tools should use, and configure embedding defaults.',
'access arguments' => $swf_admin,
'weight' => -2,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'swftools_admin_embed_form',
),
'file' => 'includes/swftools.admin.inc',
);
// If CCK is active then add a link to the CCK formatters
if (module_exists('content')) {
$items['admin/settings/swftools/cck'] = array(
'title' => 'CCK formatters',
'description' => 'Additional settings to control how SWF Tools should interact with CCK.',
'access arguments' => $swf_admin,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'swftools_admin_cck_form',
),
'file' => 'includes/swftools.admin.inc',
);
}
// Add SWF Tools status report
$items['admin/reports/swftools'] = array(
'title' => 'SWF Tools status',
'description' => 'Get an overview of the status of the SWF Tools module and its supporting files.',
'page callback' => 'swftools_status',
'access arguments' => $swf_admin,
'file' => 'includes/swftools.admin.status.inc',
'weight' => 9,
);
// Integrate items from the generic players module
$items = array_merge($items, swftools_genericplayers_menu());
// Return array of menu items
return $items;
}