You are here

public function PCPForm::submitForm in Profile Complete Percent 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 ConfigFormBase::submitForm

File

src/Form/PCPForm.php, line 125

Class

PCPForm
Provides a PCP configuration form.

Namespace

Drupal\pcp\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('pcp.settings');
  $config
    ->set('field_order', $form_state
    ->getValue('field_order'))
    ->set('open_link', $form_state
    ->getValue('open_field_link'))
    ->set('hide_block_on_complete', $form_state
    ->getValue('hide_pcp_block_on_complete'))
    ->set('profile_fields', $form_state
    ->getValue('profile_fields'))
    ->save();
  parent::submitForm($form, $form_state);
}