hook_collector_skip_procedural_attribute.module
File
-
core/
modules/ system/ tests/ modules/ hook_collector_skip_procedural_attribute/ hook_collector_skip_procedural_attribute.module
View source
<?php
/**
* @file
* Implement hooks.
*/
declare (strict_types=1);
use Drupal\Core\Hook\Attribute\ProceduralHookScanStop;
/**
* This implements a hook and should be picked up.
*
* We have set procedural_hooks: scan.
*/
function hook_collector_skip_procedural_attribute_cache_flush() : void {
// Set a global value we can check in test code.
$GLOBALS['procedural_attribute_skip_find'] = 'procedural_attribute_skip_find';
}
/**
* This implements a hook but should not be picked up.
*
* This attribute should stop all procedural hooks after.
* We implement on behalf of other modules so we can pick them up.
*/
function hook_collector_on_behalf_procedural_cache_flush() : void {
// Set a global value we can check in test code.
$GLOBALS['procedural_attribute_skip_has_attribute'] = 'procedural_attribute_skip_has_attribute';
}
/**
* This implements a hook but should not be picked up.
*
* The attribute above should prevent this from being found.
*/
function hook_collector_on_behalf_cache_flush() : void {
// Set a global value we can check in test code.
$GLOBALS['procedural_attribute_skip_after_attribute'] = 'procedural_attribute_skip_after_attribute';
}
Functions
Title | Deprecated | Summary |
---|---|---|
hook_collector_on_behalf_cache_flush | This implements a hook but should not be picked up. | |
hook_collector_on_behalf_procedural_cache_flush | This implements a hook but should not be picked up. | |
hook_collector_skip_procedural_attribute_cache_flush | This implements a hook and should be picked up. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.