Skip to content
Snippets Groups Projects

Add sync option to execute form

2 unresolved threads
@@ -140,6 +140,12 @@ class MigrationExecuteForm extends FormBase {
'#description' => $this->t('Check this box to update all previously-imported content in addition to importing new content. Leave unchecked to only import new content'),
];
$form['options']['sync'] = [
'#type' => 'checkbox',
'#title' => $this->t('Sync'),
'#description' => $this->t('Check this box to delete all destination content that is no longer present in the source.'),
];
$form['options']['force'] = [
'#type' => 'checkbox',
'#title' => $this->t('Ignore dependencies'),
@@ -269,6 +275,7 @@ class MigrationExecuteForm extends FormBase {
$options = [
'limit' => $form_state->getValue('limit') ?: 0,
'update' => $form_state->getValue('update') ?: 0,
'sync' => (bool) $form_state->getValue('sync'),
'force' => $form_state->getValue('force') ?: 0,
];
Loading