You are here

public function UserBadgeUIController::overviewFormSubmit in User Badges 7.4

Form Submit method.

Overrides EntityDefaultUIController::overviewFormSubmit

File

./user_badges.module, line 1424
Hooks and other stuff related to user badge.

Class

UserBadgeUIController
Custom controller for the administrator UI

Code

public function overviewFormSubmit($form, &$form_state) {
  $values = $form_state['values'];
  $bids = array();
  if (!empty($values['entities'])) {
    foreach ($values['entities'] as $index => $value) {
      if (!empty($value)) {
        $bids[] = str_replace('bid-', '', $value);
      }
    }
    switch ($values['operations']) {
      case 'delete':
        drupal_goto('admin/content/user_badge/bulk/delete/' . implode('|', $bids));
        break;
    }
  }
  if (!empty($values['search_text'])) {
    drupal_goto('admin/content/user_badge', array(
      'query' => array(
        'search' => $values['search_text'],
      ),
    ));
  }
}