You are here

function views_bulk_operations_action_info in Views Bulk Operations (VBO) 5

Same name and namespace in other branches
  1. 6.3 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().

1 call to views_bulk_operations_action_info()
_views_bulk_operations_get_operations in ./views_bulk_operations.module
Description Fetch available operations.

File

./views_bulk_operations.module, line 1029
Allow bulk node operations directly within views.

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 = str_replace('.', '_', basename($file->filename, '.inc')) . '_info';
      $action_info = call_user_func($action_info_fn);
      if (is_array($action_info)) {
        $actions += $action_info;
      }
    }
  }
  return $actions;
}