public function MigrationForm::submitForm in CMS Content Sync 2.1.x
Same name and namespace in other branches
- 2.0.x src/Form/MigrationForm.php \Drupal\cms_content_sync\Form\MigrationForm::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
- src/
Form/ MigrationForm.php, line 132
Class
- MigrationForm
- Content Sync general settings form.
Namespace
Drupal\cms_content_sync\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
if ('export-pools' === $form_state
->getValue('action')) {
Migration::runPoolExport(array_keys(array_filter($form_state
->getValue('export-pools'))));
}
elseif ('export-flows' === $form_state
->getValue('action')) {
Migration::runFlowExport(array_keys(array_filter($form_state
->getValue('export-flows'))));
}
elseif ('skip-flows-test' === $form_state
->getValue('action')) {
Migration::skipFlowsTest(array_keys(array_filter($form_state
->getValue('skip-flows-test'))));
}
elseif ('skip-flows-push' === $form_state
->getValue('action')) {
Migration::skipFlowsPush(array_keys(array_filter($form_state
->getValue('skip-flows-push'))));
}
elseif ('skip-flows-pull' === $form_state
->getValue('action')) {
Migration::skipFlowsPull(array_keys(array_filter($form_state
->getValue('skip-flows-pull'))));
}
elseif ('switch' === $form_state
->getValue('action')) {
Migration::runSwitch();
}
}