function xautoload_module_implements_alter in X Autoload 7.5
Same name and namespace in other branches
- 7.2 xautoload.module \xautoload_module_implements_alter()
- 7.3 xautoload.module \xautoload_module_implements_alter()
- 7.4 xautoload.module \xautoload_module_implements_alter()
Implements hook_module_implements_alter()
Parameters
array &$implementations:
string $hook:
File
- ./
xautoload.module, line 79
Code
function xautoload_module_implements_alter(&$implementations, $hook) {
// Check if new modules have been enabled.
if ('boot' === $hook) {
# \Drupal\xautoload\Tests\HackyLog::log($hook);
// hook_module_implements_alter('boot') gets called (indirectly) from
// _system_update_bootstrap_status(), which happens each time a new module
// is enabled.
xautoload()->phaseControl
->checkNewExtensions();
}
// Most hook implementations are in dedicated files.
switch ($hook) {
case 'init':
case 'custom_theme':
case 'system_theme_info':
// Move xautoload_$hook() to the start.
$implementations = array(
'xautoload' => FALSE,
) + $implementations;
break;
case 'form_system_performance_settings_alter':
// Specify that the implementation lives in xautoload.ui.inc.
$implementations['xautoload'] = 'ui';
require_once __DIR__ . '/xautoload.ui.inc';
break;
case 'modules_enabled':
case 'registry_files_alter':
// Move xautoload_$hook() to the start, and specify that the
// implementation lives in xautoload.system.inc.
$implementations = array(
'xautoload' => 'system',
) + $implementations;
require_once __DIR__ . '/xautoload.system.inc';
break;
case 'libraries_info_alter':
$implementations['xautoload'] = 'libraries';
require_once __DIR__ . '/xautoload.libraries.inc';
break;
default:
return;
}
}