function NavigationRequirements::runtime
Implements hook_runtime_requirements().
Attributes
#[Hook('runtime_requirements')]
File
-
core/
modules/ navigation/ src/ Hook/ NavigationRequirements.php, line 26
Class
- NavigationRequirements
- Requirements for the navigation module.
Namespace
Drupal\navigation\HookCode
public function runtime() : array {
$requirements = [];
if ($this->moduleHandler
->moduleExists('toolbar')) {
$requirements['toolbar'] = [
'title' => $this->t('Toolbar and Navigation modules are both installed'),
'value' => $this->t('The Navigation module is a complete replacement for the Toolbar module and disables its functionality when both modules are installed. If you are planning to continue using Navigation module, you can uninstall the Toolbar module now.'),
'severity' => RequirementSeverity::Warning,
];
}
return $requirements;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.