function MongodbMenuTreeStorage::__construct in MongoDB 8
Constructs a new \Drupal\Core\Menu\MenuTreeStorage.
Parameters
\Drupal\Core\Database\Connection $connection: A Database connection to use for reading and writing configuration data.
\Drupal\Core\Cache\CacheBackendInterface $menu_cache_backend: Cache backend instance for the extracted tree data.
\Drupal\Core\Cache\CacheTagsInvalidatorInterface $cache_tags_invalidator: The cache tags invalidator.
string $table: A database table name to store configuration data in.
array $options: (optional) Any additional database connection options to use in queries.
Overrides MenuTreeStorage::__construct
File
- src/
MongodbMenuTreeStorage.php, line 20 - Contains \Drupal\mongodb\MongodbMenuTreeStorage .
Class
Namespace
Drupal\mongodbCode
function __construct(MongoCollectionFactory $mongo, CacheBackendInterface $menu_cache_backend, CacheTagsInvalidatorInterface $cache_tags_invalidator, $table, array $options = array()) {
parent::__construct(new FakeConnection([]), $menu_cache_backend, $cache_tags_invalidator, $table);
$this->collection = $table;
$this->mongo = $mongo;
}