diff --git a/core/lib/Drupal/Core/Entity/EntityAccessControllerInterface.php b/core/lib/Drupal/Core/Entity/EntityAccessControllerInterface.php index 76df907..795a426 100644 --- a/core/lib/Drupal/Core/Entity/EntityAccessControllerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityAccessControllerInterface.php @@ -7,9 +7,6 @@ namespace Drupal\Core\Entity; -// @todo Don't depend on module level code. -use Drupal\user\User; - /** * Defines a common interface for entity access controller classes. */ @@ -30,7 +27,7 @@ * @return bool * TRUE if access was granted, FALSE otherwise. */ - public function viewAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAULT, User $account = NULL); + public function viewAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAULT, \Drupal\user\User $account = NULL); /** * Checks 'create' access for a given entity or entity translation. @@ -47,7 +44,7 @@ public function viewAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAULT * @return bool * TRUE if access was granted, FALSE otherwise. */ - public function createAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAULT, User $account = NULL); + public function createAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAULT, \Drupal\user\User $account = NULL); /** * Checks 'update' access for a given entity or entity translation. @@ -64,7 +61,7 @@ public function createAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAU * @return bool * TRUE if access was granted, FALSE otherwise. */ - public function updateAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAULT, User $account = NULL); + public function updateAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAULT, \Drupal\user\User $account = NULL); /** * Checks 'delete' access for a given entity or entity translation. @@ -81,5 +78,5 @@ public function updateAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAU * @return bool * TRUE if access was granted, FALSE otherwise. */ - public function deleteAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAULT, User $account = NULL); + public function deleteAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAULT, \Drupal\user\User $account = NULL); } diff --git a/core/lib/Drupal/Core/TypedData/AccessibleInterface.php b/core/lib/Drupal/Core/TypedData/AccessibleInterface.php index aa2508a..0e94857 100644 --- a/core/lib/Drupal/Core/TypedData/AccessibleInterface.php +++ b/core/lib/Drupal/Core/TypedData/AccessibleInterface.php @@ -27,8 +27,6 @@ * @return bool * TRUE if the given user has access for the given operation, FALSE * otherwise. - * - * @todo Don't depend on module level code. */ public function access($operation = 'view', \Drupal\user\User $account = NULL); }