class UpdateScriptTestHooks
Hook implementations for update_script_test.
Hierarchy
- class \Drupal\update_script_test\Hook\UpdateScriptTestHooks
Expanded class hierarchy of UpdateScriptTestHooks
File
-
core/
modules/ system/ tests/ modules/ update_script_test/ src/ Hook/ UpdateScriptTestHooks.php, line 13
Namespace
Drupal\update_script_test\HookView source
class UpdateScriptTestHooks {
/**
* Implements hook_cache_flush().
*
* This sets a message to confirm that all caches are cleared whenever
* update.php completes.
*
* @see UpdateScriptFunctionalTest::testRequirements()
*/
public function cacheFlush() {
\Drupal::messenger()->addStatus(t('hook_cache_flush() invoked for update_script_test.module.'));
}
/**
* Implements hook_system_info_alter().
*/
public function systemInfoAlter(array &$info, Extension $file, $type) {
$new_info = \Drupal::state()->get('update_script_test.system_info_alter');
if ($new_info) {
if ($file->getName() == 'update_script_test') {
$info = $new_info + $info;
}
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
UpdateScriptTestHooks::cacheFlush | public | function | Implements hook_cache_flush(). |
UpdateScriptTestHooks::systemInfoAlter | public | function | Implements hook_system_info_alter(). |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.