You are here

public function NodeGrantDatabaseStorage::writeDefault in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/node/src/NodeGrantDatabaseStorage.php \Drupal\node\NodeGrantDatabaseStorage::writeDefault()

Creates the default node access grant entry.

Overrides NodeGrantDatabaseStorageInterface::writeDefault

File

core/modules/node/src/NodeGrantDatabaseStorage.php, line 254
Contains \Drupal\node\NodeGrantDatabaseStorage.

Class

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

Namespace

Drupal\node

Code

public function writeDefault() {
  $this->database
    ->insert('node_access')
    ->fields(array(
    'nid' => 0,
    'realm' => 'all',
    'gid' => 0,
    'grant_view' => 1,
    'grant_update' => 0,
    'grant_delete' => 0,
  ))
    ->execute();
}