You are here

function views_bulk_operations_handler_field_operations::export_vbo_operations in Views Bulk Operations (VBO) 7.3

File

views/views_bulk_operations_handler_field_operations.inc, line 81
Views field handler. Contains all relevant VBO options and related logic. Implements the Views Form API.

Class

views_bulk_operations_handler_field_operations
@file Views field handler. Contains all relevant VBO options and related logic. Implements the Views Form API.

Code

function export_vbo_operations($indent, $prefix, $storage, $option, $definition, $parents) {

  // Anti-recursion, since we use the parent export helper.
  unset($definition['export']);

  // Find and remove all unselected/disabled operations.
  foreach ($storage['vbo_operations'] as $operation_id => $operation) {
    if (empty($operation['selected'])) {
      unset($storage['vbo_operations'][$operation_id]);
    }
  }
  return parent::export_option($indent, $prefix, $storage, $option, $definition, $parents);
}