I make extensive use of the Webform module and often use Views for managing the webform submissions.
I'm fairly new to the Actions/Rules/Triggers backend of Views Bulk Operations (VBO), but I'd really like to be able to use it in my submission management views.
I've written a module that accepts submission IDs from the URL like so: mymodule/form/314/submissions/201+202+203
and generates a page with information from all the listed submissions (in this case, submissions 201, 202, and 203).
I want to use the VBO "Pass ids as arguments to a page" operation to select submissions in a my Views table, and pass their IDs to my custom page.
As far as I can tell, this isn't possible since webform submissions are not entities. So what I'm wondering is, how can I define a very simple entity type for webform submissions, so that I can use VBO on them?
I assume I should implement hook_entity_info()
. I think the entity really only needs to include the submission ID in my case (the sid
column in the webform_submissions
db table).
I've read through the docs on defining custom entities, but can't figure out how to apply that stuff where I'm not actually wanting to create an entity type from scratch. Thanks!