summaryrefslogtreecommitdiffstats
path: root/core/modules/node/src/Entity/Node.php
diff options
context:
space:
mode:
authorAlex Pott2016-06-27 10:29:14 +0200
committerAlex Pott2016-06-27 10:29:14 +0200
commit241a653f7963227d43896d0fb3494a611366574a (patch)
tree7e695efa4f72ebb3b58c524390b126d824197020 /core/modules/node/src/Entity/Node.php
parent0bbcdf461a26ffec1a30f84f846decfd4afb5c81 (diff)
Issue #2752267 by Anicky, handrus, davic, Sagar Ramgade, tstoeckler: Drupal\node\Entity\Node::access() is dead code
Diffstat (limited to 'core/modules/node/src/Entity/Node.php')
-rw-r--r--core/modules/node/src/Entity/Node.php9
1 files changed, 2 insertions, 7 deletions
diff --git a/core/modules/node/src/Entity/Node.php b/core/modules/node/src/Entity/Node.php
index 51794be..bdb8050 100644
--- a/core/modules/node/src/Entity/Node.php
+++ b/core/modules/node/src/Entity/Node.php
@@ -178,13 +178,8 @@ class Node extends ContentEntityBase implements NodeInterface {
* {@inheritdoc}
*/
public function access($operation = 'view', AccountInterface $account = NULL, $return_as_object = FALSE) {
- if ($operation == 'create') {
- return parent::access($operation, $account, $return_as_object);
- }
-
- return \Drupal::entityManager()
- ->getAccessControlHandler($this->entityTypeId)
- ->access($this, $operation, $account, $return_as_object);
+ // This override exists to set the operation to the default value "view".
+ return parent::access($operation, $account, $return_as_object);
}
/**