How to create a VBO action in Drupal?

How to create a VBO action in Drupal?

Not only does it declare VBO actions, but it shows how you can automatically add it into a View that already exists by altering the VBO configuration. After your action has been defined, it can be added in the Views UI under Selected Bulk Operations in your Bulk operations field settings.

How to enable views bulk operations in Drupal?

To enable Views Bulk Operations for the view, just add and configure this field, if the core bulk operations field is enabled (for example Node operations bulk form for the “Content” view), that field needs to be replaced with the Views bulk operations field. Views Bulk Edit provides an action to edit selected entity fields’ values.

Which is not available in Drupal 8 core bulk form?

This module provides the following features that are not available in Drupal 8+ core bulk form: Batching of operations with configurable batch size ensuring no timeouts. Simple and well documented API for creating custom actions.

Which is an example of a VBO action?

There are several VBO examples within the VBO module itself. Take for instance delete.action.inc which allows you to delete any entity. I can’t see anything explicitly wrong with your code, but I’d highly recommend you follow convention and rework it to look like the other hook_action_info () implementations:

Where do I find VBO action in PHP?

After your action has been defined, it can be added in the Views UI under Selected Bulk Operations in your Bulk operations field settings. It will be a separate checkbox alongside other actions like Execute arbitrary PHP script, etc. Once selected, it should show up as select option or action button (depending on how the VBO field is configured).

How to view bulk operations in Drupal 7?

For View Bulk Operations purposes the forms defined for the ‘configurable’ setting are presented during the Bulk Operation execution process, after the action has been selected, and before the confirmation step (discussed as the “Per-Bulk Configuration form” below). In addition, VBO supports these settings: