function demo_umami_requirements
Same name in other branches
- 9 core/profiles/demo_umami/demo_umami.install \demo_umami_requirements()
- 8.9.x core/profiles/demo_umami/demo_umami.install \demo_umami_requirements()
- 10 core/profiles/demo_umami/demo_umami.install \demo_umami_requirements()
Implements hook_requirements().
File
-
core/
profiles/ demo_umami/ demo_umami.install, line 13
Code
function demo_umami_requirements($phase) {
$requirements = [];
if ($phase == 'runtime') {
$profile = \Drupal::installProfile();
$info = \Drupal::service('extension.list.profile')->getExtensionInfo($profile);
$requirements['experimental_profile_used'] = [
'title' => t('Experimental installation profile used'),
'value' => $info['name'],
'description' => t('Experimental profiles are provided for testing purposes only. Use at your own risk. To start building a new site, reinstall Drupal and choose a non-experimental profile.'),
'severity' => REQUIREMENT_WARNING,
];
}
return $requirements;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.