【发布时间】:2011-11-04 19:03:34
【问题描述】:
我的模块中有一个 hook_form_alter,但另一个模块 workbench_access 也有一个 hook_form_alter,我需要在 hook_form_alter 之前调用它。如何增加我的 hook_form_alter 的重量?
【问题讨论】:
标签: php drupal drupal-7 drupal-modules drupal-hooks
我的模块中有一个 hook_form_alter,但另一个模块 workbench_access 也有一个 hook_form_alter,我需要在 hook_form_alter 之前调用它。如何增加我的 hook_form_alter 的重量?
【问题讨论】:
标签: php drupal drupal-7 drupal-modules drupal-hooks
您只需将system 表中您的模块的weight 列设置为高于Workbench Access 模块的列。
请参阅How to update a module's weight 了解执行此操作的不同方法。完成后,清除 Drupal 的缓存,您的模块的钩子将在 Workbench Access 模块(很可能还有很多其他模块)之后调用。
【讨论】: