You are here

public function FieldsForm::ajaxAddItem in Feed Import 8

Ajax callback to add a new item

File

src/Form/FieldsForm.php, line 305
Contains \Drupal\feed_import\Form\FieldsForm

Class

FieldsForm

Namespace

Drupal\feed_import\Form

Code

public function ajaxAddItem(array &$form, FormStateInterface $form_state) {
  if ($form_state
    ->get('field_added')) {
    return $form['fields']['container_' . $form_state
      ->get('current_item')];
  }
  return NULL;
}