You are here

function _social_event_managers_views_bulk_operations_bulk_form_submit in Open Social 8.7

Same name and namespace in other branches
  1. 8.9 modules/social_features/social_event/modules/social_event_managers/social_event_managers.module \_social_event_managers_views_bulk_operations_bulk_form_submit()
  2. 8.5 modules/social_features/social_event/modules/social_event_managers/social_event_managers.module \_social_event_managers_views_bulk_operations_bulk_form_submit()
  3. 8.6 modules/social_features/social_event/modules/social_event_managers/social_event_managers.module \_social_event_managers_views_bulk_operations_bulk_form_submit()
  4. 8.8 modules/social_features/social_event/modules/social_event_managers/social_event_managers.module \_social_event_managers_views_bulk_operations_bulk_form_submit()
  5. 10.3.x modules/social_features/social_event/modules/social_event_managers/social_event_managers.module \_social_event_managers_views_bulk_operations_bulk_form_submit()
  6. 10.0.x modules/social_features/social_event/modules/social_event_managers/social_event_managers.module \_social_event_managers_views_bulk_operations_bulk_form_submit()
  7. 10.1.x modules/social_features/social_event/modules/social_event_managers/social_event_managers.module \_social_event_managers_views_bulk_operations_bulk_form_submit()
  8. 10.2.x modules/social_features/social_event/modules/social_event_managers/social_event_managers.module \_social_event_managers_views_bulk_operations_bulk_form_submit()

Add node ID to the route of action confirmation step.

1 string reference to '_social_event_managers_views_bulk_operations_bulk_form_submit'
social_event_managers_form_alter in modules/social_features/social_event/modules/social_event_managers/social_event_managers.module
Implements hook_form_alter().

File

modules/social_features/social_event/modules/social_event_managers/social_event_managers.module, line 559
Contains social_event_managers.module.

Code

function _social_event_managers_views_bulk_operations_bulk_form_submit($form, FormStateInterface $form_state) {

  /** @var \Drupal\Core\Url $url */
  $url = $form_state
    ->getRedirect();
  $route_parameters = [
    'node' => $form_state
      ->get('node'),
  ];
  if ($url
    ->getRouteName() === 'views_bulk_operations.execute_configurable') {
    $url = Url::fromRoute('social_event_managers.vbo.execute_configurable', $route_parameters);
  }
  if ($url
    ->getRouteName() === 'social_event_managers.vbo.confirm') {
    $url = Url::fromRoute('social_event_managers.vbo.confirm', $route_parameters);
  }
  $form_state
    ->setRedirectUrl($url);
}