function views_bulk_operations_handler_field_operations::options_validate in Views Bulk Operations (VBO) 7.3
Validate the options form.
Overrides views_handler::options_validate
File
- views/
views_bulk_operations_handler_field_operations.inc, line 222 - 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_validate(&$form, &$form_state) {
parent::options_validate($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,
);
$error_element_base = 'vbo_operations][' . $operation_id . '][';
$operation
->adminOptionsFormValidate($fake_form, $fake_form_state, $error_element_base);
}
}