You are here

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

Performs some cleanup tasks on the options array before saving it.

Overrides views_handler_field::options_submit

File

views/views_bulk_operations_handler_field_operations.inc, line 239
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 options_submit(&$form, &$form_state) {
  parent::options_submit($form, $form_state);
  $entity_type = $this
    ->get_entity_type();
  foreach ($form_state['values']['options']['vbo_operations'] as $operation_id => &$options) {
    if (empty($options['selected'])) {
      continue;
    }
    $operation = views_bulk_operations_get_operation($operation_id, $entity_type, $options);
    $fake_form = $form['vbo_operations'][$operation_id];
    $fake_form_state = array(
      'values' => &$options,
    );
    $operation
      ->adminOptionsFormSubmit($fake_form, $fake_form_state);
  }
}