I am currently trying to integrate VBO with CiviCRM. The action is listed in the action list (/admin/config/system/actions) but no vbo field is available in my civicrm contact view. I am looking for a development guide for VBO in the D7 version like this one for the D6 version:
http://drupal.org/node/459070

I am using hook_action_info() but I am in doubt if hook_views_bulk_operations_object_info() and hook_OBJECT_operations() are still supported in the D7 version and if I need to define these for vbo to pass the civicrm_contact object into the action.

Are hook_views_bulk_operations_object_info() and hook_OBJECT_operations() still supported in the D7 version of VBO?

Comments

bojanz’s picture

Status: Active » Fixed

There is no hook_views_bulk_operations_object_info() anymore, VBO works automatically on any entity type.
There is also no hook_node_operations / hook_user_operations support anymore, you use hook_action_info, or you define a rules component.

See the docs we have at http://drupal.org/node/1591352 and feel free to extend them.

mostou’s picture

Thanks alot for the answer. I have already read the documentation for D7. I read that hook_node_operations / hook_user_operations were no longer supported and instead hook_action_info should be used. But I was in doubt with hook_views_bulk_operations_object_info() and hook_OBJECT_operations() since they were not mentioned directly. I guess I understand it now - since VBO is entity based in D7 hook_views_bulk_operations_object_info is obsolete.

I have tried to use hook_action_info in a custom module. But the vbo field is not available when creating a view with Civicrm contacts. I have done some more research in the issue queu and I think it's because CiviCRM is not entity based and VBO is only based on entities now. I think it is very much related to this issue as well: #1985622: Support non-entity objects. You gave a good explanation there and Ayesh came with a possible solution. I will look more into that and discuss it in the CiviCRM forum as well.

Thanks for a great module!

mostou’s picture

Title: CiviCRM integration - vbo development guide » CiviCRM integration
Status: Fixed » Closed (fixed)

For anyone interested in a CiviCRM vbo integration please read this forum thread on the CiviCRM board:
http://forum.civicrm.org/index.php/topic,23017.msg123749.html#msg123749

And follow the link Lobo provided in his post regarding the work on implementing Drupal entities for CiviCRM objects:
http://forum.civicrm.org/index.php/topic,27871.msg121412.html#msg121412

Yuri’s picture

Issue summary: View changes

The Civicrm contact bulk operation is available, but when executed, it does not work. Contacts are not deleted, and the modify entity values operation throws an error.
Is there any information available about recent updates or maintenance?
I posted a bug report in Civicrm but they replied that they don't support VBO.

mostou’s picture

I am using the CiviCRM Entity module together with VBO with great succes - it solved my use case scenarios:
https://www.drupal.org/project/civicrm_entity