drupal-7viewdrupal-commercebulk-operations

hook_action_info does not create its VBO list item in view


I am trying to code my custom action using views and VBO. The my view shows the user a list of commerce line items.

Here the code:

function nlmcode_action_info() {
  return array(
     'vbo_download_pdf' => array(
     'type' => 'entity',
     'label' => t('Download PDF'),
     'configurable' => FALSE,
     'triggers' => array('any')
   ),
  );
}

function vbo_download_pdf($entity, $context) {
  dpm("Do the magic here.");
}

I then can see the bulk operation available in the select field but once I have selected my custom 'Download PDF' option and added to the view, the item is missing in the VBO drop down list.


Solution

  • Solved.

    Permissions to 'Download PDF' have to be set.