class ProceduralCall
Calls procedural hook implementations for backwards compatibility.
@internal
Hierarchy
- class \Drupal\Core\Extension\ProceduralCall
Expanded class hierarchy of ProceduralCall
3 files declare their use of ProceduralCall
- HookCollectorPass.php in core/
lib/ Drupal/ Core/ Hook/ HookCollectorPass.php - HookCollectorPassTest.php in core/
tests/ Drupal/ Tests/ Core/ Hook/ HookCollectorPassTest.php - ModuleHandlerTest.php in core/
tests/ Drupal/ Tests/ Core/ Extension/ ModuleHandlerTest.php
File
-
core/
lib/ Drupal/ Core/ Extension/ ProceduralCall.php, line 12
Namespace
Drupal\Core\ExtensionView source
final class ProceduralCall {
/**
* @param array $includes
* An associated array, key is a function name, value is the name of the
* include file the function lives in, if any.
*/
public function __construct(protected array $includes) {
}
/**
* Loads the file a function lives in, if any.
*
* @param string $function
* The name of the function.
*/
public function loadFile($function) : void {
if (isset($this->includes[$function])) {
include_once $this->includes[$function];
}
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
ProceduralCall::loadFile | public | function | Loads the file a function lives in, if any. |
ProceduralCall::__construct | public | function |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.