function NodeGrantDatabaseStorage::__construct
Same name and namespace in other branches
- 11.x core/modules/node/src/NodeGrantDatabaseStorage.php \Drupal\node\NodeGrantDatabaseStorage::__construct()
- 10 core/modules/node/src/NodeGrantDatabaseStorage.php \Drupal\node\NodeGrantDatabaseStorage::__construct()
- 9 core/modules/node/src/NodeGrantDatabaseStorage.php \Drupal\node\NodeGrantDatabaseStorage::__construct()
- 8.9.x core/modules/node/src/NodeGrantDatabaseStorage.php \Drupal\node\NodeGrantDatabaseStorage::__construct()
File
-
core/
modules/ node/ src/ NodeGrantDatabaseStorage.php, line 33
Class
- NodeGrantDatabaseStorage
- Defines a storage handler class that handles the node grants system.
Namespace
Drupal\nodeCode
public function __construct(protected readonly Connection $database, protected readonly ModuleHandlerInterface $moduleHandler, protected readonly LanguageManagerInterface $languageManager, #[Autowire(service: 'node.view_all_nodes_memory_cache')] protected readonly MemoryCacheInterface $memoryCache, ?NodeGrantsHelper $nodeGrantsHelper) {
if (!$nodeGrantsHelper) {
@trigger_error('Calling NodeGrantDatabaseStorage::__construct() without the $nodeGrantsHelper argument is deprecated in drupal:11.4.0 and the $nodeGrantsHelper argument will be required in drupal:12.0.0. See https://www.drupal.org/node/3578055', E_USER_DEPRECATED);
$nodeGrantsHelper = \Drupal::service(NodeGrantsHelper::class);
}
$this->nodeGrantsHelper = $nodeGrantsHelper;
$this->hasNodeGrantsImplementations = $this->moduleHandler
->hasImplementations('node_grants');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.