As #394496: Add ability to bulk update nodes with adding terms is only one use case of extending the node mass update functionalities, I suggest to extend the whole hook_node_operations.
By extending I mean providing an additional key callback form, that defines the form function that would be called after selecting the update option. (eventually this even could deal with ahah).
So the form might be like function node_operation_delete_form(&$form_state, $callback_arguments) . It could be used to alter the callback arguments before data is send to the callback. Or additionall the form could use its own submit function.
Please leave a comment for this approach.
As this issue is a follow-up by d7uxsprint I tagged it so.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | node_operations-505466_1.patch | 6.35 KB | derhasi |
| #1 | node_operations-505466.patch | 6.33 KB | derhasi |
Comments
Comment #1
derhasi commentedWith the attached patch I added a new property "callback is form" to hook_node_operations. So now, when this is set to TRUE, the callback is called as form (
function node_operation_callback(&$form_state, $nodes, $arguments)).For that little API change, the delete node operation had to change a little. I also changed the node.api.php for documentation.
Comment #2
derhasi commentedSorry, forgot to look on code style.
Comment #4
derhasi commented