You are here

public static function MongodbNodeGrantStorage::writeDefaultMongo in MongoDB 8

Write the default grant.

Parameters

MongoCollectionFactory $mongo:

3 calls to MongodbNodeGrantStorage::writeDefaultMongo()
DbHelper::do525ab523 in drivers/lib/Drupal/Driver/Database/mongodb/DbHelper.php
db_insert() in node_install()
MongodbNodeGrantStorage::writeDefault in mongodb_node/src/MongodbNodeGrantStorage.php
Creates the default node access grant entry.
mongodb_node_install in mongodb_node/mongodb_node.install

File

mongodb_node/src/MongodbNodeGrantStorage.php, line 254
Contains \Drupal\node\NodeGrantDatabaseStorage.

Class

MongodbNodeGrantStorage
Defines a controller class that handles the node grants system.

Namespace

Drupal\mongodb_node

Code

public static function writeDefaultMongo(MongoCollectionFactory $mongo) {
  $mongo
    ->get('entity.node')
    ->insert([
    '_id' => 0,
  ]);
}