hooks.inc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /*
  3. * Implementation of hook_permission().
  4. */
  5. function uc_cartlinksbuilder_permission() {
  6. return array(
  7. 'access cart links builder tool' => array(
  8. 'title' => t( 'access cart links builder tool'),
  9. ),
  10. );
  11. }
  12. /**
  13. * Implementation of hook_menu().
  14. */
  15. function uc_cartlinksbuilder_menu() {
  16. $items['admin/store/cart-links-builder'] = array(
  17. 'title' => 'Cart Links Builder',
  18. 'page callback' => 'drupal_get_form',
  19. 'page arguments' => array('uc_cartlinksbuilder_builder_form'),
  20. 'access arguments' => array('access cart links builder tool'),
  21. 'file' => 'includes/forms.inc',
  22. );
  23. $items['uc-cartlinksbuilder/autocomplete'] = array(
  24. 'type' => MENU_CALLBACK,
  25. 'page callback' => 'uc_cartlinksbuilder_product_autocomplete',
  26. 'access arguments' => array('access cart links builder tool'),
  27. 'file' => 'includes/ajax.inc',
  28. );
  29. return $items;
  30. }
  31. /**
  32. * Implements hook_ctools_plugin_directory()
  33. *
  34. * Essentially this function enables us to provide custom ctools plugins
  35. * using our module.
  36. */
  37. function uc_cartlinksbuilder_ctools_plugin_directory($module, $plugin) {
  38. if ($module == 'uc_cartlinksbuilder' || $module == 'ctools' || $module == 'panels') {
  39. return 'includes/plugins/' . $plugin;
  40. }
  41. }