You are here

public function ExportConfirmForm::onQuickExport in Content Synchronizer 8

Same name and namespace in other branches
  1. 8.2 src/Form/ExportConfirmForm.php \Drupal\content_synchronizer\Form\ExportConfirmForm::onQuickExport()
  2. 3.x src/Form/ExportConfirmForm.php \Drupal\content_synchronizer\Form\ExportConfirmForm::onQuickExport()

Action on quick export submit action.

Parameters

array $form: The form build array.

\Drupal\Core\Form\FormStateInterface $formState: The form state.

File

src/Form/ExportConfirmForm.php, line 151

Class

ExportConfirmForm
Class ExportConfirmForm.

Namespace

Drupal\content_synchronizer\Form

Code

public function onQuickExport(array &$form, FormStateInterface $formState) {
  $entities = $this
    ->getEntities();
  $writer = new ExportEntityWriter();
  $writer
    ->initFromId(time());
  $batchExportProcessor = new BatchExportProcessor($writer);
  $batchExportProcessor
    ->exportEntities($entities, [
    $this,
    'onBatchEnd',
  ]);
}