public static function SchemaFormBuilder::sequenceHandlerSubmit in Migrate API 8
Same name and namespace in other branches
- 8.2 src/SchemaFormBuilder.php \Drupal\migrate_api\SchemaFormBuilder::sequenceHandlerSubmit()
Handle form submission aspect of the sequence "Add another" form.
File
- src/
SchemaFormBuilder.php, line 201 - Contains \Drupal\migrate_api\SchemaFormBuilder.
Class
- SchemaFormBuilder
- Builds forms from schema.
Namespace
Drupal\migrate_apiCode
public static function sequenceHandlerSubmit(array &$form, FormStateInterface $form_state) {
$add_button = $form_state
->getTriggeringElement();
$deltas_key = [
'schema_form_deltas',
$add_button['#name'],
];
$deltas = $form_state
->get($deltas_key) ?: 0;
$form_state
->set($deltas_key, ++$deltas);
$form_state
->setRebuild(TRUE);
}