nodequeue_service.module 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. /**
  3. * @file
  4. * Provides a nodequeue service.
  5. *
  6. * @author Greg Harvey - http://www.drupaler.co.uk
  7. */
  8. /**
  9. * Implements hook_permission().
  10. */
  11. function nodequeue_service_permission() {
  12. return array(
  13. 'get nodequeues' => array(
  14. 'title' => t('Get nodequeues'),
  15. 'description' => t('TODO Add a description for get nodequeues'),
  16. ),
  17. );
  18. }
  19. /**
  20. * Implements hook_service().
  21. */
  22. function nodequeue_service_service() {
  23. return array(
  24. array(
  25. '#method' => 'nodequeue.getQueues',
  26. '#callback' => 'nodequeue_service_get_nodequeues',
  27. '#access callback' => 'nodequeue_service_get_nodequeues_access',
  28. '#file' => array('file' => 'inc', 'module' => 'nodequeue_service'),
  29. '#return' => 'struct',
  30. '#help' => t('Returns a keyed array by qid of available nodequeues and their settings.')
  31. ),
  32. array(
  33. '#method' => 'nodequeue.getSubQueues',
  34. '#callback' => 'nodequeue_service_get_subqueues',
  35. '#access callback' => 'nodequeue_service_get_nodequeues_access',
  36. '#file' => array('file' => 'inc', 'module' => 'nodequeue_service'),
  37. '#args' => array(
  38. array(
  39. '#name' => 'qid',
  40. '#type' => 'int',
  41. '#description' => t('A parent nodequeue queue ID.'),
  42. ),
  43. ),
  44. '#return' => 'struct',
  45. '#help' => t('Returns a keyed array by sqid of available subqueues and their settings.')
  46. ),
  47. );
  48. }