public function LaunchExportForm::removeSelectedEntities in Content Synchronizer 8
Same name and namespace in other branches
- 8.2 src/Form/LaunchExportForm.php \Drupal\content_synchronizer\Form\LaunchExportForm::removeSelectedEntities()
- 3.x src/Form/LaunchExportForm.php \Drupal\content_synchronizer\Form\LaunchExportForm::removeSelectedEntities()
Remove selected entities of the import.
File
- src/
Form/ LaunchExportForm.php, line 68
Class
- LaunchExportForm
- Launch Export Form.
Namespace
Drupal\content_synchronizer\FormCode
public function removeSelectedEntities(array &$form, FormStateInterface $form_state) {
$entitiesToRemove = $form_state
->getUserInput()['entities_to_export'];
$entitiesToRemove = array_intersect_key($this->export
->getEntitiesList(), array_flip($entitiesToRemove));
foreach ($entitiesToRemove as $entity) {
$this->export
->removeEntity($entity);
}
}