function ToolbarRequirements::runtime

Implements hook_runtime_requirements().

Attributes

#[Hook('runtime_requirements')]

File

core/modules/toolbar/src/Hook/ToolbarRequirements.php, line 26

Class

ToolbarRequirements
Requirements for the navigation module.

Namespace

Drupal\toolbar\Hook

Code

public function runtime() : array {
  $requirements = [];
  if ($this->moduleHandler
    ->moduleExists('navigation')) {
    $requirements['navigation'] = [
      'title' => $this->t('Toolbar and Navigation modules are both installed'),
      'value' => $this->t('Toolbar is disabled when the Navigation replacement module is available to the current user. It is recommended to uninstall Toolbar.'),
      'severity' => RequirementSeverity::Warning,
    ];
  }
  return $requirements;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.