2

How can I know what module will implement earlier?

I have a module (custom) which implements hook_module_implements_alter and an other module (contrib) which is also implements it. In this case the contrib module is being executed later, overriding my implementation.

So, how can I ensure that my module will be executed later?

3
  • 1
    Set the weight of your module in the system table to higher than the other module's? That should force your implementation of hook_module_implements_alter() to run last. Failing that, maybe you can actually use hook_module_implements_alter() to push your module's implementation of hook_module_implements_alter() to the end...though my brain hurts after thinking about that
    – Clive
    Commented Feb 26, 2015 at 16:56
  • Nice try. But all of it could be versioned? Im using features.
    – fnandogp
    Commented Feb 26, 2015 at 17:12
  • The latter method wouldn't need anything extra (the hook would go in the feature module). Not sure about the first method, and Google isn't turning anything up
    – Clive
    Commented Feb 26, 2015 at 17:53

1 Answer 1

2

You need to change the weight of the modules in system table to modify their execution order.

One module that can help you in that is the Modules Weight, which provides an admin interface and avoids changing the SQL record directly.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.