You are here

function farm_livestock_weight_views_default_views_alter in farmOS 7

Implements hook_views_default_views_alter().

File

modules/farm/farm_livestock/farm_livestock_weight/farm_livestock_weight.module, line 1147
Farm livestock weight module.

Code

function farm_livestock_weight_views_default_views_alter(&$views) {

  // Add the Weight VBO operation to the animals view.
  if (!empty($views['farm_animals'])) {
    $views['farm_animals']->display['default']->display_options['fields']['views_bulk_operations']['vbo_operations'] += [
      'action::farm_livestock_weight_action' => [
        'selected' => 1,
        'skip_confirmation' => 0,
        'skip_permission_check' => 1,
        'override_label' => 0,
        'label' => '',
      ],
    ];
  }
}