diff --git a/core/lib/Drupal/Core/Entity/EntityAccessCheck.php b/core/lib/Drupal/Core/Entity/EntityAccessCheck.php index ec85c70..391db5b 100644 --- a/core/lib/Drupal/Core/Entity/EntityAccessCheck.php +++ b/core/lib/Drupal/Core/Entity/EntityAccessCheck.php @@ -7,7 +7,6 @@ namespace Drupal\Core\Entity; -use Drupal\Core\TypedData\AccessibleInterface; use Drupal\Core\Entity\EntityInterface; use Symfony\Component\Routing\Route; use Symfony\Component\HttpFoundation\Request; @@ -19,7 +18,7 @@ class EntityAccessCheck implements AccessCheckInterface { /** - * Implements \Drupal\Core\Access\AccessCheckInterface::applies(). + * {@inheritdoc} */ public function applies(Route $route) { return array_key_exists('_entity_access', $route->getRequirements()); @@ -44,7 +43,7 @@ public function access(Route $route, Request $request) { // If this slug is in the request, and it is an entity, check its access. if ($request->attributes->has($slug)) { $entity = $request->attributes->get($slug); - if ($entity instanceof AccessibleInterface) { + if ($entity instanceof EntityInterface) { return $entity->access($operation); } } diff --git a/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php index 85b9347..895a198 100644 --- a/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityAccessCheckTest.php @@ -11,7 +11,6 @@ use Symfony\Component\Routing\Route; use Drupal\Core\Entity\EntityAccessCheck; use Drupal\Tests\UnitTestCase; -use Drupal\node\Plugin\Core\Entity\Node; /** * Tests the entity access controller. @@ -70,4 +69,5 @@ public function testAccess() { $access = $access_check->access($route, $request); $this->assertEquals(TRUE, $access); } + }