summaryrefslogtreecommitdiffstats
path: root/core/modules/node/src/Entity/Node.php
diff options
context:
space:
mode:
authorNathaniel Catchpole2016-01-13 15:07:32 +0900
committerNathaniel Catchpole2016-01-13 15:07:32 +0900
commit758a81e61d0df5098ed398936f37f95493df02f2 (patch)
tree371eef25e1ae4ee0f5d8ca8d2b0a934c9eac7476 /core/modules/node/src/Entity/Node.php
parentf7b30ad65c57c62a2d90c59473b38ae81ea9a5db (diff)
Issue #2473021 by jcnventura, amitgoyal: Deprecate NodeAccessControlHandlerInterface::writeGrants() for removal in Drupal 9.0.x
Diffstat (limited to 'core/modules/node/src/Entity/Node.php')
-rw-r--r--core/modules/node/src/Entity/Node.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/core/modules/node/src/Entity/Node.php b/core/modules/node/src/Entity/Node.php
index 118e862..cd9b4e5 100644
--- a/core/modules/node/src/Entity/Node.php
+++ b/core/modules/node/src/Entity/Node.php
@@ -131,7 +131,10 @@ class Node extends ContentEntityBase implements NodeInterface {
// default revision. There's no need to delete existing records if the node
// is new.
if ($this->isDefaultRevision()) {
- \Drupal::entityManager()->getAccessControlHandler('node')->writeGrants($this, $update);
+ /** @var \Drupal\node\NodeAccessControlHandlerInterface $access_control_handler */
+ $access_control_handler = \Drupal::entityManager()->getAccessControlHandler('node');
+ $grants = $access_control_handler->acquireGrants($this);
+ \Drupal::service('node.grant_storage')->write($this, $grants, NULL, $update);
}
// Reindex the node when it is updated. The node is automatically indexed