Add form class to summary for hooks and form submission handler in contact.module

Created on 16 July 2024, about 2 months ago
Updated 30 August 2024, 9 days ago

In the contact.module there are the following documentation comments.

/**
 * Implements hook_form_FORM_ID_alter().
 *
 * Add the enable personal contact form to an individual user's account page.
 *
 * @see \Drupal\user\ProfileForm::form()
 */
/**
 * Implements hook_form_FORM_ID_alter().
 *
 * Add the default personal contact setting on the user settings page.
 *
 * @see \Drupal\user\AccountSettingsForm
 */
/**
 * Form submission handler for user_admin_settings().
 *
 * @see contact_form_user_admin_settings_alter()
 */
function contact_form_user_admin_settings_submit($form, FormStateInterface $form_state) {
  \Drupal::configFactory()->getEditable('contact.settings')
    ->set('user_default_enabled', $form_state->getValue('contact_default_status'))
    ->save();
}

The description should say for which form the hook implementation or the form submission handler is, as the examples on Drupal API documentation standards for functions / Form-generating functions and Drupal API documentation standards for functions / Hook implementation show. Since form builders are now classes, the description cannot reference a function, which is no longer exist in Drupal 8+.

📌 Task
Status

Fixed

Version

11.0 🔥

Component
Documentation 

Last updated less than a minute ago

No maintainer
Created by

🇮🇹Italy apaderno Brescia, 🇮🇹

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024