public function SocialProfileFieldsFlushForm::submitForm in Open Social 8.9
Same name and namespace in other branches
- 8.2 modules/social_features/social_profile/modules/social_profile_fields/src/Form/SocialProfileFieldsFlushForm.php \Drupal\social_profile_fields\Form\SocialProfileFieldsFlushForm::submitForm()
- 8.3 modules/social_features/social_profile/modules/social_profile_fields/src/Form/SocialProfileFieldsFlushForm.php \Drupal\social_profile_fields\Form\SocialProfileFieldsFlushForm::submitForm()
- 8.4 modules/social_features/social_profile/modules/social_profile_fields/src/Form/SocialProfileFieldsFlushForm.php \Drupal\social_profile_fields\Form\SocialProfileFieldsFlushForm::submitForm()
- 8.5 modules/social_features/social_profile/modules/social_profile_fields/src/Form/SocialProfileFieldsFlushForm.php \Drupal\social_profile_fields\Form\SocialProfileFieldsFlushForm::submitForm()
- 8.6 modules/social_features/social_profile/modules/social_profile_fields/src/Form/SocialProfileFieldsFlushForm.php \Drupal\social_profile_fields\Form\SocialProfileFieldsFlushForm::submitForm()
- 8.7 modules/social_features/social_profile/modules/social_profile_fields/src/Form/SocialProfileFieldsFlushForm.php \Drupal\social_profile_fields\Form\SocialProfileFieldsFlushForm::submitForm()
- 8.8 modules/social_features/social_profile/modules/social_profile_fields/src/Form/SocialProfileFieldsFlushForm.php \Drupal\social_profile_fields\Form\SocialProfileFieldsFlushForm::submitForm()
- 10.3.x modules/social_features/social_profile/modules/social_profile_fields/src/Form/SocialProfileFieldsFlushForm.php \Drupal\social_profile_fields\Form\SocialProfileFieldsFlushForm::submitForm()
- 10.0.x modules/social_features/social_profile/modules/social_profile_fields/src/Form/SocialProfileFieldsFlushForm.php \Drupal\social_profile_fields\Form\SocialProfileFieldsFlushForm::submitForm()
- 10.1.x modules/social_features/social_profile/modules/social_profile_fields/src/Form/SocialProfileFieldsFlushForm.php \Drupal\social_profile_fields\Form\SocialProfileFieldsFlushForm::submitForm()
- 10.2.x modules/social_features/social_profile/modules/social_profile_fields/src/Form/SocialProfileFieldsFlushForm.php \Drupal\social_profile_fields\Form\SocialProfileFieldsFlushForm::submitForm()
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- modules/
social_features/ social_profile/ modules/ social_profile_fields/ src/ Form/ SocialProfileFieldsFlushForm.php, line 101
Class
- SocialProfileFieldsFlushForm
- Class SocialProfileFieldsFlushForm.
Namespace
Drupal\social_profile_fields\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$pids = \Drupal::entityQuery('profile')
->condition('type', 'profile')
->execute();
$fields = $this
->getUnselectedFields();
$batch = [
'title' => t('Flushing profiles.'),
'operations' => [
[
'\\Drupal\\social_profile_fields\\SocialProfileFieldsBatch::performFlush',
[
$pids,
$fields,
],
],
],
'finished' => '\\Drupal\\social_profile_fields\\SocialProfileFieldsBatch::performFlushFinishedCallback',
];
batch_set($batch);
$form_state
->setRedirectUrl($this
->getCancelUrl());
}