public function SiteSettingReplicateForm::submitForm in Site Settings and Labels 8
Form submission handler.
Parameters
array $form: An associative array containing the structure of the form.
\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.
Overrides FormInterface::submitForm
File
- src/Form/ SiteSettingReplicateForm.php, line 224 
Class
- SiteSettingReplicateForm
- Class SiteSettingReplicateForm.
Namespace
Drupal\site_settings\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
  $values = $form_state
    ->getValues();
  // Decide what action to take based on which button the user clicked.
  switch ($values['op']) {
    case 'Add another setting':
      $this
        ->addNewFields($form, $form_state);
      break;
    default:
      $this
        ->finalSubmit($form, $form_state);
  }
}