function scald_menu in Scald: Media Management made easy 7
Same name and namespace in other branches
- 6 scald.module \scald_menu()
Implements hook_menu().
File
- ./
scald.module, line 2027 - The Scald Core, which handles all Scald Registries and dispatch.
Code
function scald_menu() {
$items = array();
$items['admin/content/atoms'] = array(
'title' => 'Atoms',
'weight' => -60,
'page callback' => 'scald_admin_atoms',
'access callback' => 'user_access',
'access arguments' => array(
'administer scald atoms',
),
'file' => 'includes/scald.admin.inc',
'type' => MENU_LOCAL_TASK,
);
$items['admin/structure/scald'] = array(
'title' => 'Scald',
'description' => 'Manage Scald Atom Types, Contexts, and their associated settings.',
'page callback' => 'scald_admin_dashboard',
'access callback' => 'user_access',
'access arguments' => array(
'administer scald',
),
'file' => 'includes/scald.admin.inc',
'type' => MENU_NORMAL_ITEM,
);
$items['admin/structure/scald/context/add'] = array(
'title' => 'Add Scald context',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'scald_admin_context_form',
),
'access arguments' => array(
'administer scald',
),
'file' => 'includes/scald.admin.inc',
);
$items['admin/structure/scald/context/edit/%'] = array(
'title' => 'Edit Scald context',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'scald_admin_context_form',
5,
),
'access arguments' => array(
'administer scald',
),
'file' => 'includes/scald.admin.inc',
);
$items['admin/structure/scald/context/delete/%'] = array(
'title' => 'Delete Scald context',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'scald_admin_context_confirm_delete_form',
5,
),
'access arguments' => array(
'administer scald',
),
'file' => 'includes/scald.admin.inc',
);
$items['admin/structure/scald/%scald_type'] = array(
'title' => 'Type',
'title callback' => 'scald_type_name',
'title arguments' => array(
3,
),
'weight' => -80,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'scald_admin_type_form',
3,
),
'access callback' => 'user_access',
'access arguments' => array(
'administer scald',
),
'file' => 'includes/scald.admin.inc',
'type' => MENU_NORMAL_ITEM,
);
$items['admin/structure/scald/%scald_type/edit'] = array(
'title' => 'Edit',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -20,
);
$items['admin/structure/scald/%scald_type/contexts'] = array(
'title' => 'Contexts',
'weight' => 40,
'page callback' => 'scald_admin_contexts',
'page arguments' => array(
3,
),
'access callback' => 'user_access',
'access arguments' => array(
'administer scald',
),
'file' => 'includes/scald.admin.inc',
'type' => MENU_LOCAL_TASK,
);
$items['admin/structure/scald/%scald_type/player/%/%'] = array(
'title' => 'Player settings',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'scald_player_settings_form',
3,
5,
6,
),
'access arguments' => array(
'administer scald',
),
'file' => 'includes/scald.admin.inc',
'type' => MENU_NORMAL_ITEM,
);
$items['admin/config/content/scald'] = array(
'title' => 'Scald',
'weight' => 20,
'page callback' => 'drupal_get_form',
'page arguments' => array(
'scald_settings_form',
),
'access callback' => 'user_access',
'access arguments' => array(
'administer scald',
),
'file' => 'includes/scald.admin.inc',
);
$items['atom/add'] = array(
'title' => 'Create Atom',
'page callback' => 'scald_atom_add',
'access callback' => 'scald_atom_add_access',
'file' => 'includes/scald.pages.inc',
);
// The following two items do the same thing. We can consider them aliases.
$items['atom/add/%scald_type'] = array(
'title' => 'Create Atom',
'page callback' => 'scald_atom_add_page',
'page arguments' => array(
FALSE,
2,
),
'access callback' => 'scald_atom_add_access',
'access arguments' => array(
2,
),
'file' => 'includes/scald.pages.inc',
'type' => MENU_CALLBACK,
);
$items['atom/add/%scald_type/%ctools_js'] = array(
'title' => 'Create Atom',
'page callback' => 'scald_atom_add_page',
'page arguments' => array(
3,
2,
),
'access callback' => 'scald_atom_add_access',
'access arguments' => array(
2,
),
'theme callback' => 'ajax_base_page_theme',
'file' => 'includes/scald.pages.inc',
'type' => MENU_CALLBACK,
);
$items['atom/%scald_atom'] = array(
'title callback' => 'entity_label',
'title arguments' => array(
'scald_atom',
1,
),
'page callback' => 'scald_atom_page_view',
'page arguments' => array(
1,
),
'access callback' => 'scald_action_permitted',
'access arguments' => array(
1,
'view',
),
'file' => 'includes/scald.pages.inc',
);
$items['atom/%scald_atom/view'] = array(
'title' => 'View',
'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => -10,
);
// The following two items do the same thing. We can consider them aliases.
$items['atom/%scald_atom/edit'] = array(
'title' => 'Edit',
'page callback' => 'scald_atom_edit_page',
'page arguments' => array(
FALSE,
1,
),
'access callback' => 'scald_action_permitted',
'access arguments' => array(
1,
'edit',
),
'file' => 'includes/scald.pages.inc',
'weight' => 0,
'type' => MENU_LOCAL_TASK,
'context' => MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE,
);
$items['atom/%scald_atom/edit/%ctools_js'] = array(
'title' => 'Edit Atom',
'page callback' => 'scald_atom_edit_page',
'page arguments' => array(
3,
1,
),
'access callback' => 'scald_action_permitted',
'access arguments' => array(
1,
'edit',
),
'theme callback' => 'ajax_base_page_theme',
'file' => 'includes/scald.pages.inc',
);
$items['atom/%scald_atom/delete'] = array(
'title' => 'Delete',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'scald_atom_delete_confirm',
1,
),
'access callback' => 'scald_action_permitted',
'access arguments' => array(
1,
'delete',
),
'file' => 'includes/scald.pages.inc',
'weight' => 50,
'type' => MENU_LOCAL_TASK,
);
$items['atom/%scald_atom/delete/%ctools_js'] = array(
'title' => 'Delete Atom',
'page callback' => 'scald_atom_delete_confirm_ajax',
'page arguments' => array(
3,
1,
),
'access callback' => 'scald_action_permitted',
'access arguments' => array(
1,
'delete',
),
'theme callback' => 'ajax_base_page_theme',
'file' => 'includes/scald.pages.inc',
);
// JSON callback allowing to fetch atoms, which provides is usefull
// for library implementations and RTE integrations.
$items['atom/fetch/%'] = array(
'title' => 'Fetch atoms',
'page callback' => 'scald_atom_fetch_atoms',
'page arguments' => array(
2,
),
'access callback' => TRUE,
'file' => 'includes/scald.pages.inc',
'theme callback' => 'ajax_base_page_theme',
);
// Optional devel module integration.
if (module_exists('devel')) {
$items['atom/%scald_atom/devel'] = array(
'title' => 'Devel',
'page callback' => 'devel_load_object',
'page arguments' => array(
'scald_atom',
1,
),
'access arguments' => array(
'access devel information',
),
'type' => MENU_LOCAL_TASK,
'file' => 'devel.pages.inc',
'file path' => drupal_get_path('module', 'devel'),
'weight' => 100,
);
$items['atom/%scald_atom/devel/load'] = array(
'title' => 'Load',
'type' => MENU_DEFAULT_LOCAL_TASK,
);
$items['atom/%scald_atom/devel/render'] = array(
'title' => 'Render',
'page callback' => 'devel_render_object',
'page arguments' => array(
'scald_atom',
1,
),
'access arguments' => array(
'access devel information',
),
'file' => 'devel.pages.inc',
'file path' => drupal_get_path('module', 'devel'),
'type' => MENU_LOCAL_TASK,
'weight' => 100,
);
}
return $items;
}