function NodeViewsData::getNodeAccessImplementations
Returns a list of modules that implements a node access hook.
Return value
array<string,string> An associative array where keys are module machine names and values are the human-readable names.
1 call to NodeViewsData::getNodeAccessImplementations()
- NodeViewsData::getViewsData in core/
modules/ node/ src/ NodeViewsData.php - Returns views data for the entity type.
File
-
core/
modules/ node/ src/ NodeViewsData.php, line 434
Class
- NodeViewsData
- Provides the views data for the node entity type.
Namespace
Drupal\nodeCode
private function getNodeAccessImplementations() : array {
$implementations = [];
if ($this->moduleHandler
->hasImplementations('node_grants')) {
$module_data = $this->moduleExtensionList
->getAllInstalledInfo();
foreach ([
'node_grants',
'node_grants_alter',
] as $hook) {
$this->moduleHandler
->invokeAllWith($hook, static function (callable $hook, string $module) use (&$implementations, $module_data) {
$implementations[$module] = $module_data[$module]['name'];
});
}
}
return $implementations;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.