We have a lot of hooks in core/modules/system/system.api.php that do not relate to the System module specifically. See parent issue #2299715: [meta] Move core hooks from system.api.php to core.api.php or other files for more discussion.

For this issue, the task is to move several form-related hooks to form.api.php in the same directory.

Specifically:

a) Change the @file description at the top of the file to say "Callbacks and hooks related to the form system.".

b) At the current end of the file, add lines:

/**
 * @} End of "addtogroup callbacks".
 */

c) After that, add the following:

/**
 * @addtogroup hooks
 * @{
 */

/**
 * @} End of "addtogroup hooks".
 */

d) Between the two addtogroup hooks blocks, move the following hooks from the system.api.php file to this file:

hook_ajax_render_alter()
hook_form_alter()
hook_form_FORM_ID_alter()
hook_form_BASE_FORM_ID_alter()
hook_batch_alter()

Comments

Palashvijay4O’s picture

Assigned: Unassigned » Palashvijay4O
Palashvijay4O’s picture

Status: Active » Needs review
StatusFileSize
new15.18 KB

Review needed .

jhodgdon’s picture

Status: Needs review » Fixed

Thanks! Looks great. Committed to 8.0.x.

  • jhodgdon committed 448be8a on
    Issue #2366589 by Palashvijay4: Move form-related hooks to form.api.php
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.