public function ExportConfirmForm::onAddToExport in Content Synchronizer 8
Same name and namespace in other branches
- 8.2 src/Form/ExportConfirmForm.php \Drupal\content_synchronizer\Form\ExportConfirmForm::onAddToExport()
- 3.x src/Form/ExportConfirmForm.php \Drupal\content_synchronizer\Form\ExportConfirmForm::onAddToExport()
Add entity to an existing entity export.
Parameters
array $form: The form build array.
\Drupal\Core\Form\FormStateInterface $formState: The form state.
File
- src/
Form/ ExportConfirmForm.php, line 182
Class
- ExportConfirmForm
- Class ExportConfirmForm.
Namespace
Drupal\content_synchronizer\FormCode
public function onAddToExport(array &$form, FormStateInterface $formState) {
$exportsList = ExportEntity::loadMultiple($formState
->getValue('exports_list'));
foreach ($this
->getEntities() as $entity) {
/** @var \Drupal\content_synchronizer\Entity\ExportEntity $export */
foreach ($exportsList as $export) {
$export
->addEntity($entity);
}
}
}