You are here

public function EntityExportCsvTrait::ajaxReplaceExporterCallback in Entity Export CSV 8

Ajax replace callback.

Parameters

array $form: The form.

\Drupal\Core\Form\FormStateInterface $form_state: The form state.

Return value

array The form field configuration.

File

src/Form/EntityExportCsvTrait.php, line 67

Class

EntityExportCsvTrait
Provides a trait for Entity Export Csv form.

Namespace

Drupal\entity_export_csv\Form

Code

public function ajaxReplaceExporterCallback(array $form, FormStateInterface $form_state) {
  $triggering_element = $form_state
    ->getTriggeringElement();
  $parent = $triggering_element['#parents'][0];
  return $form['bundle_wrapper']['fields'][$parent]['form'];
}