You are here

public function WebformSubmissionValue::ajaxChangeFieldMap in Pardot Integration 2.x

This is used to update the dom of the table container when changing a row plugin.

Parameters

array $form: The form array.

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

Return value

array|mixed|null Just return the mapped field container.

File

src/Plugin/PardotFormMapFormatterPlugin/WebformSubmissionValue.php, line 271

Class

WebformSubmissionValue
Plugin to generate a text field and consume tokens for mappings.

Namespace

Drupal\pardot\Plugin\PardotFormMapFormatterPlugin

Code

public function ajaxChangeFieldMap(array &$form, FormStateInterface $form_state) {
  $trigger_element = $form_state
    ->getTriggeringElement();
  $parents = array_slice($trigger_element['#array_parents'], 0, -1);
  return NestedArray::getValue($form, $parents);
}