protected function SchemaFormBuilder::mappingHandler in Migrate API 8
Same name and namespace in other branches
- 8.2 src/SchemaFormBuilder.php \Drupal\migrate_api\SchemaFormBuilder::mappingHandler()
Handle building a form when a mapping is encountered.
Parameters
array $schema: A schema plugin definition or subtree.
string $context: The key for the form subtree currently being built.
array $form: The form or form subtree to attach elements to.
\Drupal\Core\Form\FormStateInterface $form_state: The form state of the form the subtree is attached to, for AJAX reasons.
File
- src/
SchemaFormBuilder.php, line 159 - Contains \Drupal\migrate_api\SchemaFormBuilder.
Class
- SchemaFormBuilder
- Builds forms from schema.
Namespace
Drupal\migrate_apiCode
protected function mappingHandler($schema, $context, &$form, FormStateInterface $form_state) {
// Resolve all the keys in a map.
foreach ($schema['mapping'] as $mapping_key => $mapping) {
$this
->processSchema($mapping, $mapping_key, $form[$context], $form_state);
}
}