function NodeGrantDatabaseStorage::__construct
File
-
core/
modules/ node/ src/ NodeGrantDatabaseStorage.php, line 28
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 MemoryCacheInterface $memoryCache) {
if (!$memoryCache) {
@trigger_error('Calling NodeGrantDatabaseStorage::__construct() without the $memoryCache argument is deprecated in drupal:11.3.0 and the $memoryCache argument will be required in drupal:12.0.0. See https://www.drupal.org/node/3038909', E_USER_DEPRECATED);
$this->memoryCache = \Drupal::service('node.view_all_nodes_memory_cache');
}
$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.