1

Is there a way to exclude dependencies of dependencies? For example: my_module.info contains dependencies[] = views

dependencies[] = ctools

my_sub_module.info contains

dependencies[] = my_module

On the module display page my_sub_modue will have my_module, views and ctools as dependencies. I know this is the desired outcome in 99% of all situations but I was curious to know if there were a way to have only my_module (or items explicitly stated in the info file) as the dependency for my_sub_module.

Thanks

1 Answer 1

0

In my opinion, the best is have always in mind solid and stable solution.

If you have this problem you should change your design, not your code.

Your module should have a display, and your submodule should have a display who modifies your module's display.

2
  • To help clarify my question, is there a way to have "items explicitly stated in the info file" as the dependencies instead of them being recursively resolved? The specific reason for this is although I could accomplish the same with module_exists or function_exists and provide a drupal_set_message, I would like to use drupal's established way of displaying these dependencies on the modules page instead of making my own.
    – John R
    Feb 2, 2016 at 11:37
  • Thanks for the typos, SOLID isn't really a typo are five principles of software design. Mar 12, 2016 at 18:59

Your Answer

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

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