Download & Extend

Unify #process callback naming

Project:Drupal core
Version:7.x-dev
Component:forms system
Category:task
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Currently, there are several differing naming schemes for the #process callback for RenderAPI elements (those returned from hook_elements): expand_*, form_expand_* and process_*. This patch unifies the naming to form_process_*. It does not change any functionality whatsoever.

AttachmentSizeStatusTest resultOperations
unify-process-callbacks.patch7.08 KBIgnored: Check issue status.NoneNone

Comments

#1

Status:needs review» reviewed & tested by the community

I tested and code reviewed. RTBC.

#2

Excellent. This has bothered me too. Thanks, kkaefer :)

#3

Component:base system» forms system

#4

Status:reviewed & tested by the community» needs work

Can we reroll? Doesn't seem to apply.

#5

Status:needs work» needs review

Updated. Ran some of the tests, nothing failed.

AttachmentSizeStatusTest resultOperations
unify-process-callbacks.patch6.74 KBIgnored: Check issue status.NoneNone

#6

Status:needs review» reviewed & tested by the community

Applied, grepped thru the core to verify that no traces of old functions remains. Everything looks good.

egrep -r '#process' . returns:

<?php
modules
/system/system.module:    '#process' => array('form_process_ahah'),
modules/system/system.module:    '#process' => array('form_process_ahah'),
modules/system/system.module:    '#process' => array('form_process_ahah'),
modules/system/system.module:    '#process' => array('form_process_ahah'),
modules/system/system.module:    '#process' => array('form_process_ahah'),
modules/system/system.module:    '#process' => array('form_process_password_confirm'),
modules/system/system.module:    '#process' => array('form_process_ahah'),
modules/system/system.module:    '#process' => array('form_process_radios'),
modules/system/system.module:    '#process' => array('form_process_ahah'),
modules/system/system.module:    '#process' => array('form_process_checkboxes'),
modules/system/system.module:    '#process' => array('form_process_ahah'),
modules/system/system.module:    '#process' => array('form_process_ahah'),
modules/system/system.module:    '#process' => array('form_process_weight', 'form_process_ahah'),
modules/system/system.module:    '#process' => array('form_process_date'),
modules/system/system.module:    '#process' => array('form_process_ahah'),
modules/system/system.module:    '#process' => array('form_process_ahah'),
?>

Neat.

#7

Status:reviewed & tested by the community» needs work

Nice little clean-up. I've committed this to CVS HEAD. I'm marking this 'code needs work' as it probably requires a couple of documentation updates, both in the upgrading guide as in the API docs for CVS HEAD. Please mark this closed once the documentation is in good shape. Thanks for the great work!

#8

Nice little clean-up. I've committed this to CVS HEAD. I'm marking this 'code needs work' as it probably requires a couple of documentation updates, both in the upgrading guide as in the API docs for CVS HEAD. Please mark this closed once the documentation is in good shape. Thanks for the great work!

#9

Status:needs work» fixed

Documented at http://drupal.org/node/224333#process-functions.

#10

Status:fixed» closed (fixed)

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

#11

Fixed spelling mistake from 'occured' to 'occurred' in http://drupal.org/update/modules/6/7#process_functions

#12

In the current Drupal7.0-beta2 the function "form_process_ahah" is gone. What is its replacement?

The documentation http://drupal.org/update/modules/6/7 about updateing modules still references it.

Thanks,
udo

nobody click here