public function ExportAllForm::submitForm in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_export/src/Form/ExportAllForm.php \Drupal\bibcite_export\Form\ExportAllForm::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/
bibcite_export/ src/ Form/ ExportAllForm.php, line 176
Class
- ExportAllForm
- Export all reference data to any available export format.
Namespace
Drupal\bibcite_export\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$format = $this->formatManager
->createInstance($form_state
->getValue('format'));
$batch = [
'title' => t('Export all reference data'),
'operations' => [
[
'bibcite_export_batch_all',
[
'bibcite_reference',
$format,
],
],
],
'file' => drupal_get_path('module', 'bibcite_export') . '/bibcite_export.batch.inc',
'finished' => 'bibcite_export_batch_finished',
];
batch_set($batch);
}