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.
I created a View type based on a simple/flat table (non-entity) by implementing hook_views_data()
. That table is a base table.
I want to implement some VBO actions against this table. I used hook_action_info()
and created some actions (with 'type' => 'system'
). The problem is that when creating a View based on this new data source, I cannot see the VBO filed in the field list.
Is there something special that I need to implement in order to have VBO field/column available?
Comments
Comment #1
bojanz CreditAttribution: bojanz commentedAs I said on IRC, and as is written in the README, VBO only supports entity (base or revision) tables.
Implement hook_entity_info() and make your table an entity.
Use EntityAPIController so that you don't need to write other boilerplate functions.
Comment #2
claudiu.cristeaThank you. I used
hook_entity_info()
to wrap around the Drupal "queue" system table. I built a new module Views Queue that exposes SystemQueue in Views and allows performing some simple VBO operations against the queue.