context.menu.inc 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * @file
  4. * Contains menu item registration for the context tool.
  5. *
  6. * The menu items registered are AJAX callbacks for the context configuration
  7. * popups. They are kept separately for organizational purposes.
  8. */
  9. function ctools_context_menu(&$items) {
  10. $base = array(
  11. 'access arguments' => array('access content'),
  12. 'type' => MENU_CALLBACK,
  13. 'file' => 'includes/context-admin.inc',
  14. 'theme callback' => 'ajax_base_page_theme',
  15. );
  16. $items['ctools/context/ajax/add'] = array(
  17. 'page callback' => 'ctools_context_ajax_item_add',
  18. ) + $base;
  19. $items['ctools/context/ajax/configure'] = array(
  20. 'page callback' => 'ctools_context_ajax_item_edit',
  21. ) + $base;
  22. $items['ctools/context/ajax/delete'] = array(
  23. 'page callback' => 'ctools_context_ajax_item_delete',
  24. ) + $base;
  25. // For the access system
  26. $base['file'] = 'includes/context-access-admin.inc';
  27. $items['ctools/context/ajax/access/add'] = array(
  28. 'page callback' => 'ctools_access_ajax_add',
  29. ) + $base;
  30. $items['ctools/context/ajax/access/configure'] = array(
  31. 'page callback' => 'ctools_access_ajax_edit',
  32. ) + $base;
  33. $items['ctools/context/ajax/access/delete'] = array(
  34. 'page callback' => 'ctools_access_ajax_delete',
  35. ) + $base;
  36. }