Hook for queue deletion
jmather - October 16, 2009 - 06:14
| Project: | Nodequeue |
| Version: | 6.x-2.x-dev |
| Component: | Miscellaneous |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
If I'm implementing a smart queue, how can I hook the delete of a queue in order to take actions based on this?

#1
Great question! The answer seems to be that you can't. It would be relatively simple to add a hook for queue deletion, probably involving nodequeue_delete(). Patches welcome :).
I'm interested to hear what kid of subqueue you're creating.
#2
Here is a shot at a patch. I think it is pretty simple, the only question would be if there is a better way to get the queue before the delete?
#3
Marking as needs review.
#4
Thanks for the patch! This looks like a good start. We should probably place this new hook in the nodequeue_delete function, so that it will be called even when queues are deleted programatically, not just through the interface.
This looks otherwise commit worthy.
#5
Attached with api call moved to nodequeue_delete.
Let me know if that works.
Thanks.
#6
Any update on getting this merged in?
Thx.
#7
Sorry, this was marked as "needs work" so I didn't see it. Hope to review this weekend. Thanks for the bump!
#8
Thanks for the re-roll.
This needs a bit more work before it can be committed:
A) Since we're firing this hook in nodequeue_delete instead of nodequeue_delete_submit, the hook should probably be called nodequeue_api_queue_admin_delete
B) There's no reason to pass the empty $form_state variable.
Sorry about the delay in re-reviewing this. I can turn this around quicker with another re-roll.
Thanks!