You are here

function regcode_views_default_views_alter in Registration codes 7

Same name and namespace in other branches
  1. 8 regcode.views.inc \regcode_views_default_views_alter()
  2. 7.2 regcode.views.inc \regcode_views_default_views_alter()

Implements hook_views_default_views().

File

./regcode.views.inc, line 242
Views integration for regcode module.

Code

function regcode_views_default_views_alter(&$views) {
  if (isset($views['regcode']) && module_exists('views_bulk_operations')) {
    $view = $views['regcode'];
    $handler = $view->display['default'];
    $newfields = array();

    /* Field: Bulk operations: Regcode */
    $newfields['views_bulk_operations']['id'] = 'views_bulk_operations';
    $newfields['views_bulk_operations']['table'] = 'regcode';
    $newfields['views_bulk_operations']['field'] = 'views_bulk_operations';
    $newfields['views_bulk_operations']['label'] = '';
    $newfields['views_bulk_operations']['element_label_colon'] = FALSE;
    $newfields['views_bulk_operations']['vbo_settings']['display_type'] = '0';
    $newfields['views_bulk_operations']['vbo_settings']['enable_select_all_pages'] = 1;
    $newfields['views_bulk_operations']['vbo_settings']['force_single'] = 0;
    $newfields['views_bulk_operations']['vbo_settings']['entity_load_capacity'] = '10';
    $newfields['views_bulk_operations']['vbo_operations'] = array(
      'action::regcode_activate_action' => array(
        'selected' => 1,
        'postpone_processing' => 0,
        'skip_confirmation' => 0,
        'override_label' => 0,
        'label' => '',
      ),
      'action::regcode_deactivate_action' => array(
        'selected' => 1,
        'postpone_processing' => 0,
        'skip_confirmation' => 0,
        'override_label' => 0,
        'label' => '',
      ),
      'action::regcode_delete_action' => array(
        'selected' => 1,
        'postpone_processing' => 0,
        'skip_confirmation' => 0,
        'override_label' => 0,
        'label' => '',
      ),
      'action::regcode_mailer_mail_action' => array(
        'selected' => 1,
        'postpone_processing' => 0,
        'skip_confirmation' => 0,
        'override_label' => 0,
        'label' => '',
      ),
      'action::regcode_tag_action' => array(
        'selected' => 1,
        'postpone_processing' => 0,
        'skip_confirmation' => 0,
        'override_label' => 0,
        'label' => '',
      ),
    );
    $handler->display_options['fields'] = $newfields + $handler->display_options['fields'];
  }
}