You are here

function views_bulk_operations_load_action_includes in Views Bulk Operations (VBO) 7.3

Loads the VBO actions placed in their own include files (under actions/).

Return value

An array of containing filenames of the included actions.

2 calls to views_bulk_operations_load_action_includes()
views_bulk_operations_action_info in ./views_bulk_operations.module
Implements hook_action_info().
views_bulk_operations_theme in ./views_bulk_operations.module
Implements hook_theme().

File

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

Code

function views_bulk_operations_load_action_includes() {
  static $loaded = FALSE;

  // The list of VBO actions is fairly static, so it's hardcoded for better
  // performance (hitting the filesystem with file_scan_directory(), and then
  // caching the result has its cost).
  $files = array(
    'archive.action',
    'argument_selector.action',
    'book.action',
    'change_owner.action',
    'delete.action',
    'modify.action',
    'script.action',
    'user_roles.action',
    'user_cancel.action',
  );
  if (!$loaded) {
    foreach ($files as $file) {
      module_load_include('inc', 'views_bulk_operations', 'actions/' . $file);
    }
    $loaded = TRUE;
  }
  return $files;
}