You are here

function hook_simplified_modules_hidden_submodules in Simplified Modules 7

Define modules that will be auto-enabled when all their dependencies are met.

These modules are typically part of a package that contains many submodules, but on certain sites you just want to have one choice on the modules page, with the submodules turned on automatically whenever they are able to be.

Any modules which you return from this hook will be hidden from the modules page, and turned on automatically whenever all their dependencies are met. (They will also be turned off automatically when their dependencies are no longer met.)

Return value

An array of module names.

See also

hook_simplified_modules_hidden_submodules_alter()

1 function implements hook_simplified_modules_hidden_submodules()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

simplified_modules_test_simplified_modules_hidden_submodules in tests/simplified_modules_test.module
Implements hook_simplified_modules_hidden_submodules().
1 invocation of hook_simplified_modules_hidden_submodules()
simplified_modules_hidden_submodules in ./simplified_modules.module
Returns modules that are auto-enabled when all their dependencies are met.

File

./simplified_modules.api.php, line 30
Hooks provided by the Simplified Modules module.

Code

function hook_simplified_modules_hidden_submodules() {
  return array(
    // Prevent the Views UI module from appearing on the Modules page, but turn
    // it on automatically whenever Views (which it depends on) is enabled.
    'views_ui',
    // Prevent a number of the component modules from the XML Sitemap package
    // from appearing on the Modules page, and enable their functionality
    // automatically whenever available. (For example, the 'xmlsitemap_menu'
    // module will automatically turn on whenever XML Sitemap and Menu are both
    // enabled, since it depends on both of them.)
    'xmlsitemap_engines',
    'xmlsitemap_menu',
    'xmlsitemap_node',
    'xmlsitemap_taxonomy',
  );
}