Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The actions module is just the UI for managing actions, but the actual functionality is in includes.
I was trying to make a bulk form for admin/people, and to do so would mean making user depend on actions...
It should just be in system module.
Comment | File | Size | Author |
---|---|---|---|
#7 | vdc-1851082-7.patch | 10.62 KB | tim.plunkett |
#3 | vdc-1851082-3.patch | 12.37 KB | tim.plunkett |
Comments
Comment #1
tim.plunkettOh, hm, I missed hook_user_operations(). I think I might be severely mistaken here.
Comment #2
dawehnerI think the plan of fago is to put actions into the entity system, and get rid of action.module
but until then action_do, which is used by that field, belongs to actions.module.
Comment #3
tim.plunkettHere's hook_user_operations() as a bulk form handler.
Comment #4
dawehnerShouldn't we just postpone this until there is a proper operations/actions API into core? It's a lot of effort to get both
hook_node_operations hook_user_operations in, to remove it finally anyway?
Comment #5
bojanz CreditAttribution: bojanz commentedI agree with #4.
hook_user_operations is a relic and it needs to die.
Comment #6
tim.plunkettIt wasn't that much work. And there's been no progress on the other issue.
But you're right.
I still might work on this though.
Comment #7
tim.plunkettOkay, this should be the first step. Regardless of what happens with other operations, we'll need to have other subclasses of this. So let's get this in, and I'll open up new issues for porting hook_user_operations() and hook_node_operations().
All this does is keep the action.module specific stuff in the subclass, and move everything else to an abstract class. Subclasses have to implement views_form_submit() (an existing method) and getBulkOptions().
The diff looks a little funny since it both modifies and copies the existing action bulk form class.
Comment #8
dawehnerGreen if it's green :)
So much better!
I'm wondering whether we should call this action, but yeah operations are somehow similar.
I really like abstract functions as it really helps developers.
Just in case someone wonders, camelcase that will be done later, as that is not a new function here.
Comment #9
webchickCommitted and pushed to 8.x. Thanks!
Comment #10
tim.plunkettSee #1894972: Provide a bulk form for user operations for the first usage of this.
Comment #11
tim.plunkettHere's the other #1895160: Convert admin/content to a View, keep a non-views fallback with no bulk operations
Comment #12
tim.plunkett