public function OfficialFacebookPixelSettingsForm::submitForm in Official Facebook Pixel 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/ OfficialFacebookPixelSettingsForm.php, line 81 - Contains \Drupal\official_facebook_pixel\Form \OfficialFacebookPixelSettingsForm.
Class
- OfficialFacebookPixelSettingsForm
- Class OfficialFacebookPixelSettingsForm.
Namespace
Drupal\official_facebook_pixel\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// Retrieve the configuration
$this
->config(OfficialFacebookPixelConfig::CONFIG_NAME)
->set(OfficialFacebookPixelConfig::FORM_PIXEL_KEY, $form_state
->getValue(OfficialFacebookPixelConfig::FORM_PIXEL_KEY))
->set(OfficialFacebookPixelConfig::FORM_PII_KEY, $form_state
->getValue(OfficialFacebookPixelConfig::FORM_PII_KEY))
->save();
parent::submitForm($form, $form_state);
}