class DependencyVersionTestHooks
Hook implementations for dependency_version_test.
Hierarchy
- class \Drupal\dependency_version_test\Hook\DependencyVersionTestHooks
Expanded class hierarchy of DependencyVersionTestHooks
File
-
core/
modules/ system/ tests/ modules/ dependency_version_test/ src/ Hook/ DependencyVersionTestHooks.php, line 13
Namespace
Drupal\dependency_version_test\HookView source
class DependencyVersionTestHooks {
/**
* Implements hook_system_info_alter().
*/
public function systemInfoAlter(&$info, Extension $file, $type) : void {
// Simulate that the core version for Views module contains the string '8.x'.
if ($file->getName() == 'views') {
$info['version'] = '9.8.x-dev';
}
// Make the test_module require Views 9.2, which should be compatible with
// core version 9.8.x-dev from above.
if ($file->getName() == 'test_module') {
$info['dependencies'] = [
'drupal:views (>=9.2)',
];
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
DependencyVersionTestHooks::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.