public function MongodbNodeGrantStorage::delete in MongoDB 8
Deletes all node access entries.
Overrides NodeGrantDatabaseStorageInterface::delete
File
- mongodb_node/
src/ MongodbNodeGrantStorage.php, line 237 - Contains \Drupal\node\NodeGrantDatabaseStorage.
Class
- MongodbNodeGrantStorage
- Defines a controller class that handles the node grants system.
Namespace
Drupal\mongodb_nodeCode
public function delete() {
$this->mongo
->get('entity.node')
->update([
'grant' => [
'$exists' => TRUE,
],
], [
'$unset' => [
'grant' => '',
],
], [
'multi' => TRUE,
]);
}