NodeGrantDatabaseStorage::writeDefault

public NodeGrantDatabaseStorage::writeDefault()

Creates the default node access grant entry.

Overrides NodeGrantDatabaseStorageInterface::writeDefault

File

core/modules/node/src/NodeGrantDatabaseStorage.php, line 254

Class

NodeGrantDatabaseStorage
Defines a storage handler 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();
}
doc_Drupal
2016-10-29 09:30:49
Comments
Leave a Comment

Please login to continue.