You are here

function views_bulk_operations_get_operation_info in Views Bulk Operations (VBO) 7.3

Gets the info array of an operation from the provider plugin.

Parameters

$operation_id: The id of the operation for which the info shall be returned, or NULL to return an array with info about all operations.

2 calls to views_bulk_operations_get_operation_info()
views_bulk_operations_get_applicable_operations in ./views_bulk_operations.module
Get all operations that match the current entity type.
views_bulk_operations_handler_field_operations::init in views/views_bulk_operations_handler_field_operations.inc
Initialize the entity type.

File

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

Code

function views_bulk_operations_get_operation_info($operation_id = NULL) {
  $operations =& drupal_static(__FUNCTION__);
  if (!isset($operations)) {
    $operations = array();
    $plugins = views_bulk_operations_get_operation_types();
    foreach ($plugins as $plugin) {
      $operations += $plugin['list callback']();
    }
    uasort($operations, '_views_bulk_operations_sort_operations_by_label');
  }
  if (!empty($operation_id)) {
    return $operations[$operation_id];
  }
  else {
    return $operations;
  }
}