You are here

public function StringoverridesAdminForm::addExtraRow in String Overrides 8

Submit handler to add extra row.

Parameters

array $form: Drupal form array.

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

File

src/Form/StringoverridesAdminForm.php, line 200

Class

StringoverridesAdminForm
Class StringoverridesAdminForm.

Namespace

Drupal\stringoverrides\Form

Code

public function addExtraRow(array $form, FormStateInterface $form_state) {
  $storage = $form_state
    ->getStorage();
  $storage['number-of-rows']++;
  $form_state
    ->setStorage($storage);
  $form_state
    ->setRebuild(TRUE);
}