public function SocialGroupViewsBulkOperationsBulkForm::viewsFormValidate in Open Social 8.6
Same name and namespace in other branches
- 8.9 modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::viewsFormValidate()
- 8.5 modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::viewsFormValidate()
- 8.7 modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::viewsFormValidate()
- 8.8 modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::viewsFormValidate()
- 10.3.x modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::viewsFormValidate()
- 10.0.x modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::viewsFormValidate()
- 10.1.x modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::viewsFormValidate()
- 10.2.x modules/social_features/social_group/src/Plugin/views/field/SocialGroupViewsBulkOperationsBulkForm.php \Drupal\social_group\Plugin\views\field\SocialGroupViewsBulkOperationsBulkForm::viewsFormValidate()
File
- modules/
social_features/ social_group/ src/ Plugin/ views/ field/ SocialGroupViewsBulkOperationsBulkForm.php, line 158
Class
- SocialGroupViewsBulkOperationsBulkForm
- Defines the Groups Views Bulk Operations field plugin.
Namespace
Drupal\social_group\Plugin\views\fieldCode
public function viewsFormValidate(&$form, FormStateInterface $form_state) {
if ($this->view
->id() === 'group_manage_members' && $this->options['buttons']) {
$user_input = $form_state
->getUserInput();
foreach (Element::children($form['actions']) as $action) {
/** @var \Drupal\Core\StringTranslation\TranslatableMarkup $label */
$label = $form['actions'][$action]['#value'];
if (strip_tags($label
->render()) === $user_input['op']) {
$form_state
->setTriggeringElement($form['actions'][$action]);
break;
}
}
}
parent::viewsFormValidate($form, $form_state);
}