api-task.html 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. task definition:
  2. title -- visible title of the task.
  3. description -- description of the task.
  4. hook menu -- function to delegate from hook_menu. Params: &$items, $task
  5. hook menu alter -- function to delegate from hook_menu_alter. Params: &$items, $task
  6. hook theme -- function to delegate from hook_theme. Params: &$items, $task
  7. admin name -- if set an admin menu will appear in the delegator UI
  8. admin description -- to describe the admin menu
  9. admin access callback -- if set, the callback to use to determine administrative
  10. access to this task. Defaults to user_access. Note that this is required even
  11. if delegator isn't handling administration, since this gets used to on handler
  12. edit forms.
  13. admin access arguments -- If set, the arguments to use to determine administrative
  14. access to this task. Defaults to array('administer delegator');
  15. type -- The type of the task, used to determine which handlers can service it.
  16. subtasks -- can be TRUE in which case it supports subtasks with the default
  17. configuration or a string (array?) with callbacks to fetch subtask data.
  18. subtask callback -- A callback which returns just one subtask. Param: $task, $subtask_id
  19. subtasks callback -- A callback which returns an array of all subtasks.
  20. This MUST return an array, even if it's empty.Param: $task
  21. default handlers -- If the task contains any default handlers, they can be included here.
  22. task names must not contain a - as that is used to separate the task name from the subtask ID.
  23. subtasks implement data very similar to their parent task. In particular, they
  24. implement the following items exactly like their task:
  25. hook menu
  26. hook menu alter
  27. description
  28. admin name
  29. admin description
  30. admin access callback
  31. admin access arguments