class Requirements1TestHooks

Hook implementations for requirements1_test.

Hierarchy

Expanded class hierarchy of Requirements1TestHooks

File

core/modules/system/tests/modules/requirements1_test/src/Hook/Requirements1TestHooks.php, line 12

Namespace

Drupal\requirements1_test\Hook
View source
class Requirements1TestHooks {
    
    /**
     * Implements hook_requirements_alter().
     */
    public function requirementsAlter(array &$requirements) : void {
        // Change the title.
        $requirements['requirements1_test_alterable']['title'] = t('Requirements 1 Test - Changed');
        // Decrease the severity.
        $requirements['requirements1_test_alterable']['severity'] = REQUIREMENT_WARNING;
        // Delete 'requirements1_test_deletable',
        unset($requirements['requirements1_test_deletable']);
    }

}

Members

Title Sort descending Modifiers Object type Summary
Requirements1TestHooks::requirementsAlter public function Implements hook_requirements_alter().

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