You are here

public function MappingEditFormBase::getMappingTable in GatherContent 8.5

Same name and namespace in other branches
  1. 8.4 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 163

Class

MappingEditFormBase
Class MappingEditFormBase.

Namespace

Drupal\gathercontent_ui\Form

Code

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'];
}