Exemplo n.º 1
0
 /**
  * Validates the admin options form.
  *
  * @param $form
  *   The admin options form.
  * @param $form_state
  *   An array containing the current state of the form. Note that this array
  *   is constructed by the VBO views field handler, so it's not a real form
  *   state, it contains only the 'values' key.
  * @param $error_element_base
  *   The base to prepend to field names when using form_set_error().
  *   Needed because the admin settings form is embedded into a bigger form.
  */
 public function adminOptionsFormValidate($form, &$form_state, $error_element_base)
 {
     parent::adminOptionsFormValidate($form, $form_state, $error_element_base);
     if (!empty($form['settings'])) {
         $settings_validation_callback = $this->operationInfo['callback'] . '_views_bulk_operations_form_validate';
         if (function_exists($settings_validation_callback)) {
             $fake_form = $form['settings'];
             $fake_form_state = array('values' => &$form_state['values']['settings']);
             $error_element_base .= 'settings][';
             $settings_validation_callback($fake_form, $fake_form_state, $error_element_base);
         }
     }
 }