Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 291082

form_execute_handlers. Change from $finction( to call_user_func

$
0
0

API page: http://api.drupal.org/api/drupal/includes%21form.inc/function/form_execu...

Could we change the submit process?
Now it calls $function($form, $form_state);
It will be better if we use call_user_func that is used in another places. It will allow us to hide the form processing logic into classes like this:

<?php
class form {
  function
_($form_state) {

  }

  function
__submit($form, &$form_state) {
   
  }
}
?>

We will register it in this way.
<?php
 
'page callback'=> 'drupal_get_form',
 
'page arguments'=> array('form::_', 3),
?>

It is for en example.

Now it builds the form by this way, but it can not process it


Viewing all articles
Browse latest Browse all 291082

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>