Alana Storm
Alana Storm

Reputation: 166086

Can you Control the Order of Hooks "Firing" in Drupal?

If two modules implement the same hook in Drupal, does the system have a way to define which order the hook functions are called, or is it just luck of the draw/alphabetical ordering? Or something else? Or does my question show I misunderstand hooks in some fundamental way that makes me look dumb?

Upvotes: 2

Views: 437

Answers (2)

Tyler Eaves
Tyler Eaves

Reputation: 13121

The order is determined based on the weight setting for the module in the system table. If two modules have the same weight, the order is alphabetical.

Upvotes: 5

soju
soju

Reputation: 25312

Take a look at module weight in database, or use http://drupal.org/project/moduleweight

Upvotes: 3

Related Questions