You are here

function views_bulk_operations_action_info in Views Bulk Operations (VBO) 6.3

Same name and namespace in other branches
  1. 5 views_bulk_operations.module \views_bulk_operations_action_info()
  2. 6 views_bulk_operations.module \views_bulk_operations_action_info()
  3. 7.3 views_bulk_operations.module \views_bulk_operations_action_info()

Implementation of hook_action_info().

File

./views_bulk_operations.module, line 1134
Allows operations to be performed on items selected in a view.

Code

function views_bulk_operations_action_info() {
  $actions = array();
  $files = file_scan_directory(drupal_get_path('module', 'views_bulk_operations'), '(.*).action.inc$');
  if ($files) {
    foreach ($files as $file) {
      require_once $file->filename;
      $action_info_fn = 'views_bulk_operations_' . str_replace('.', '_', basename($file->filename, '.inc')) . '_info';
      $action_info = call_user_func($action_info_fn);
      if (is_array($action_info)) {
        $actions += $action_info;
      }
    }
  }

  // Add VBO's own programmatic action.
  $actions['views_bulk_operations_action'] = array(
    'description' => t('Execute a VBO programmatically'),
    'type' => 'system',
    'configurable' => TRUE,
    'rules_ignore' => TRUE,
  );
  return $actions;
}