experimental_module_requirements_test.install

Same filename in other branches
  1. 9 core/modules/system/tests/modules/experimental_module_requirements_test/experimental_module_requirements_test.install
  2. 8.9.x core/modules/system/tests/modules/experimental_module_requirements_test/experimental_module_requirements_test.install
  3. 11.x core/modules/system/tests/modules/experimental_module_requirements_test/experimental_module_requirements_test.install

Experimental Test Requirements module to test hook_requirements().

File

core/modules/system/tests/modules/experimental_module_requirements_test/experimental_module_requirements_test.install

View source
<?php


/**
 * @file
 * Experimental Test Requirements module to test hook_requirements().
 */

/**
 * Implements hook_requirements().
 */
function experimental_module_requirements_test_requirements() {
    $requirements = [];
    if (\Drupal::state()->get('experimental_module_requirements_test_requirements', FALSE)) {
        $requirements['experimental_module_requirements_test_requirements'] = [
            'severity' => REQUIREMENT_ERROR,
            'description' => t('The Experimental Test Requirements module can not be installed.'),
        ];
    }
    return $requirements;
}

Functions

Title Deprecated Summary
experimental_module_requirements_test_requirements Implements hook_requirements().

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