function ModuleRuntimeRequirementsHooks::runtimeRequirements

Implements hook_runtime_requirements().

Attributes

#[Hook('runtime_requirements')]

File

core/modules/system/tests/modules/module_runtime_requirements/src/Hook/ModuleRuntimeRequirementsHooks.php, line 21

Class

ModuleRuntimeRequirementsHooks
Hook implementations for module_runtime_requirements.

Namespace

Drupal\module_runtime_requirements\Hook

Code

public function runtimeRequirements() : array {
  return [
    'test.runtime.error' => [
      'title' => $this->t('RuntimeError'),
      'value' => $this->t('None'),
      'description' => $this->t('Runtime Error.'),
      'severity' => RequirementSeverity::Error,
    ],
    'test.runtime.error.alter' => [
      'title' => $this->t('RuntimeError'),
      'value' => $this->t('None'),
      'description' => $this->t('Runtime Error.'),
      'severity' => RequirementSeverity::Error,
    ],
  ];
}

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