_module_implements_maintenance

  1. drupal
    1. drupal7
Versionen
drupal7 _module_implements_maintenance($hook, $sort = FALSE)

This is the maintenance version of module_implements for internal use only.

This function is called whenever MAINTENANCE_MODE is defined and is a safe code path for Drupal installation or upgrade because it does not use the database, instead it uses module_list.

Übergabeparameter

$hook The name of the hook (e.g. "help" or "menu").

$sort By default, modules are ordered by weight and filename, settings this option to TRUE, module list will be ordered by module name.

Rückgabewert

An array with the names of the modules which are implementing this hook. Only enabled and already loaded modules are taken into consideration.

See also

module_list $fixed_list on how to make module_list also DB independent.

Verwandte Themen

Code

includes/module.inc, line 462

<?php
function _module_implements_maintenance($hook, $sort = FALSE) {
  $implementations = array();
  foreach (module_list() as $module) {
    $function = $module . '_' . $hook;
    if (function_exists($function)) {
      $implementations[] = $module;
    }
    if ($sort) {
      sort($implementations);
    }
  }
  return $implementations;
}
?>

Kommentare

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen

Kommentar hinzufügen

Der Inhalt dieses Feldes wird nicht öffentlich zugänglich angezeigt.
  • Internet- und E-Mail-Adressen werden automatisch umgewandelt.
  • Zulässige HTML-Tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Zeilen und Absätze werden automatisch erzeugt.

Weitere Informationen über Formatierungsoptionen