public function SocialEventManagersViewsBulkOperationsBulkForm::viewsFormSubmit in Open Social 8.5
Same name and namespace in other branches
- 8.9 modules/social_features/social_event/modules/social_event_managers/src/Plugin/views/field/SocialEventManagersViewsBulkOperationsBulkForm.php \Drupal\social_event_managers\Plugin\views\field\SocialEventManagersViewsBulkOperationsBulkForm::viewsFormSubmit()
- 8.6 modules/social_features/social_event/modules/social_event_managers/src/Plugin/views/field/SocialEventManagersViewsBulkOperationsBulkForm.php \Drupal\social_event_managers\Plugin\views\field\SocialEventManagersViewsBulkOperationsBulkForm::viewsFormSubmit()
- 8.7 modules/social_features/social_event/modules/social_event_managers/src/Plugin/views/field/SocialEventManagersViewsBulkOperationsBulkForm.php \Drupal\social_event_managers\Plugin\views\field\SocialEventManagersViewsBulkOperationsBulkForm::viewsFormSubmit()
- 8.8 modules/social_features/social_event/modules/social_event_managers/src/Plugin/views/field/SocialEventManagersViewsBulkOperationsBulkForm.php \Drupal\social_event_managers\Plugin\views\field\SocialEventManagersViewsBulkOperationsBulkForm::viewsFormSubmit()
- 10.3.x modules/social_features/social_event/modules/social_event_managers/src/Plugin/views/field/SocialEventManagersViewsBulkOperationsBulkForm.php \Drupal\social_event_managers\Plugin\views\field\SocialEventManagersViewsBulkOperationsBulkForm::viewsFormSubmit()
- 10.0.x modules/social_features/social_event/modules/social_event_managers/src/Plugin/views/field/SocialEventManagersViewsBulkOperationsBulkForm.php \Drupal\social_event_managers\Plugin\views\field\SocialEventManagersViewsBulkOperationsBulkForm::viewsFormSubmit()
- 10.1.x modules/social_features/social_event/modules/social_event_managers/src/Plugin/views/field/SocialEventManagersViewsBulkOperationsBulkForm.php \Drupal\social_event_managers\Plugin\views\field\SocialEventManagersViewsBulkOperationsBulkForm::viewsFormSubmit()
- 10.2.x modules/social_features/social_event/modules/social_event_managers/src/Plugin/views/field/SocialEventManagersViewsBulkOperationsBulkForm.php \Drupal\social_event_managers\Plugin\views\field\SocialEventManagersViewsBulkOperationsBulkForm::viewsFormSubmit()
File
- modules/
social_features/ social_event/ modules/ social_event_managers/ src/ Plugin/ views/ field/ SocialEventManagersViewsBulkOperationsBulkForm.php, line 256
Class
- SocialEventManagersViewsBulkOperationsBulkForm
- Defines the Enrollments Views Bulk Operations field plugin.
Namespace
Drupal\social_event_managers\Plugin\views\fieldCode
public function viewsFormSubmit(array &$form, FormStateInterface $form_state) {
parent::viewsFormSubmit($form, $form_state);
if ($form_state
->get('step') === 'views_form_views_form' && $this->view
->id() === 'event_manage_enrollments') {
/** @var \Drupal\Core\Url $url */
$url = $form_state
->getRedirect();
if ($url
->getRouteName() === 'views_bulk_operations.execute_configurable') {
$parameters = $url
->getRouteParameters();
if (empty($parameters['node'])) {
$node = \Drupal::routeMatch()
->getParameter('node');
if ($node instanceof NodeInterface) {
// You can get nid and anything else you need from the node object.
$parameters['node'] = $node
->id();
}
elseif (!is_object($node)) {
$parameters['node'] = $node;
}
}
$url = Url::fromRoute('social_event_managers.vbo.execute_configurable', [
'node' => $parameters['node'],
]);
$form_state
->setRedirectUrl($url);
}
}
}