public function MappingEditFormBase::getMappingTable in GatherContent 8.4
Same name and namespace in other branches
- 8.5 gathercontent_ui/src/Form/MappingEditFormBase.php \Drupal\gathercontent_ui\Form\MappingEditFormBase::getMappingTable()
Ajax callback for mapping multistep form.
@inheritdoc
Return value
array Array of form elements.
File
- gathercontent_ui/
src/ Form/ MappingEditFormBase.php, line 130
Class
- MappingEditFormBase
- Class MappingEditFormBase.
Namespace
Drupal\gathercontent_ui\FormCode
public function getMappingTable(array &$form, FormStateInterface $form_state) {
$this->contentType = $form_state
->getValue('content_type');
$fields = $this->entityReferenceFieldsOptions;
$form['mapping']['#attached']['drupalSettings']['gathercontent'] = empty($fields) ? NULL : $fields;
$form_state
->setRebuild(TRUE);
return $form['mapping'];
}