function drush_module_implements

8.0.x environment_7.inc drush_module_implements($hook, $sort = FALSE, $reset = FALSE)
8.0.x environment_6.inc drush_module_implements($hook, $sort = FALSE, $reset = FALSE)
8.0.x environment.inc drush_module_implements($hook, $sort = FALSE, $reset = FALSE)
7.x environment_7.inc drush_module_implements($hook, $sort = FALSE, $reset = FALSE)
7.x environment_6.inc drush_module_implements($hook, $sort = FALSE, $reset = FALSE)
7.x environment.inc drush_module_implements($hook, $sort = FALSE, $reset = FALSE)
master environment_7.inc drush_module_implements($hook, $sort = FALSE, $reset = FALSE)
master environment.inc drush_module_implements($hook, $sort = FALSE, $reset = FALSE)

Determines which modules are implementing a hook.

Parameters

string $hook: The hook name.

bool $sort: Not used in Drupal 8 environment.

bool $reset: TRUE to reset the hook implementation cache.

See also

\Drupal\Core\Extension\ModuleHandlerInterface::getImplementations().

\Drupal\Core\Extension\ModuleHandlerInterface::resetImplementations().

4 calls to drush_module_implements()

File

commands/core/drupal/environment.inc, line 158
Specific functions for a drupal 8+ environment. drush_include_engine() magically includes either this file or environment_X.inc depending on which version of drupal Drush is called from.

Code

function drush_module_implements($hook, $sort = FALSE, $reset = FALSE) {
  // $sort is there for consistency, but looks like Drupal 8 has no equilavient for it.
  // We can sort the list manually later if really needed.
  if ($reset == TRUE) {
    \Drupal::moduleHandler()->resetImplementations();
  }
  return \Drupal::moduleHandler()->getImplementations($hook);
}