contact.module

Same filename and directory in other branches
  1. 11.x core/modules/contact/contact.module
  2. 10 core/modules/contact/contact.module
  3. 9 core/modules/contact/contact.module
  4. 8.9.x core/modules/contact/contact.module
  5. 7.x modules/contact/contact.module

File

core/modules/contact/contact.module

View source
<?php


/**
 * @file
 */

use Drupal\contact\Hook\ContactFormHooks;
use Drupal\Core\Form\FormStateInterface;

/**
 * Form submission handler for \Drupal\user\ProfileForm.
 *
 * Saves the contact page setting.
 *
 * @deprecated in drupal:11.4.0 and is removed from drupal:12.0.0. Use
 *   \Drupal\contact\Hook\ContactFormHooks::profileFormSubmit() instead.
 *
 * @see https://www.drupal.org/node/3566774
 */
function contact_user_profile_form_submit($form, FormStateInterface $form_state) : void {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:12.0.0. Use \\Drupal\\contact\\Hook\\ContactFormHooks::profileFormSubmit() instead. See https://www.drupal.org/node/3566774', E_USER_DEPRECATED);
  \Drupal::service(ContactFormHooks::class)->profileFormSubmit($form, $form_state);
}

/**
 * Form submission handler for \Drupal\user\AccountSettingsForm.
 *
 * @deprecated in drupal:11.4.0 and is removed from drupal:12.0.0. Use
 *   \Drupal\contact\Hook\ContactFormHooks::userAdminSettingsSubmit instead.
 *
 * @see https://www.drupal.org/node/3566774
 */
function contact_form_user_admin_settings_submit($form, FormStateInterface $form_state) : void {
  @trigger_error(__FUNCTION__ . '() is deprecated in drupal:11.4.0 and is removed from drupal:12.0.0. Use \\Drupal\\contact\\Hook\\ContactFormHooks::userAdminSettingsSubmit instead. See https://www.drupal.org/node/3566774', E_USER_DEPRECATED);
  \Drupal::service(ContactFormHooks::class)->userAdminSettingsSubmit($form, $form_state);
}

Functions

Title Deprecated Summary
contact_form_user_admin_settings_submit

in drupal:11.4.0 and is removed from drupal:12.0.0. Use \Drupal\contact\Hook\ContactFormHooks::userAdminSettingsSubmit instead.

Form submission handler for \Drupal\user\AccountSettingsForm.
contact_user_profile_form_submit

in drupal:11.4.0 and is removed from drupal:12.0.0. Use \Drupal\contact\Hook\ContactFormHooks::profileFormSubmit() instead.

Form submission handler for \Drupal\user\ProfileForm.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.