in mymodule_form_alter i call:

  foreach (module_implements('mymodule_form_alter') as $module) {
    $function = $module . '_mymodule_form_alter';
    $function($form, $data);
  }

to pass in the $form and custom data in $data. i am not sure if that is the proper way to implement that with hooks.
opinions?

Comments

dtengeri’s picture

Hi!

I think you need module_incoke_all().
Its first argument is the name of the hook you want to call and any other arguments you add, itt will be passed to every hook.

Regards,
David