diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php index 979614f..14ad25c 100644 --- a/core/lib/Drupal/Core/Entity/Entity.php +++ b/core/lib/Drupal/Core/Entity/Entity.php @@ -251,7 +251,7 @@ public function getIterator() { /** * Implements AccessibleInterface::access(). */ - public function access($operation = 'view', \Drupal\user\Plugin\Core\Entity\User $account = NULL) { + public function access($operation = 'view', \Drupal\user\EntityType\User $account = NULL) { $method = $operation . 'Access'; return entity_access_controller($this->entityType)->$method($this, LANGUAGE_DEFAULT, $account); } diff --git a/core/lib/Drupal/Core/Entity/EntityAccessController.php b/core/lib/Drupal/Core/Entity/EntityAccessController.php index 2f13110..6827206 100644 --- a/core/lib/Drupal/Core/Entity/EntityAccessController.php +++ b/core/lib/Drupal/Core/Entity/EntityAccessController.php @@ -7,7 +7,7 @@ namespace Drupal\Core\Entity; -use Drupal\user\Plugin\Core\Entity\User; +use Drupal\user\EntityType\User; /** * Defines a base class for entity access controllers. diff --git a/core/lib/Drupal/Core/Entity/EntityAccessControllerInterface.php b/core/lib/Drupal/Core/Entity/EntityAccessControllerInterface.php index 5bbc996..f0f6f10 100644 --- a/core/lib/Drupal/Core/Entity/EntityAccessControllerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityAccessControllerInterface.php @@ -8,7 +8,7 @@ namespace Drupal\Core\Entity; // @todo Don't depend on module level code. -use Drupal\user\Plugin\Core\Entity\User; +use Drupal\user\EntityType\User; /** * Defines a common interface for entity access controller classes. @@ -23,7 +23,7 @@ * @param string $langcode * (optional) The language code for which to check access. Defaults to * LANGUAGE_DEFAULT. - * @param \Drupal\user\Plugin\Core\Entity\User $account + * @param \Drupal\user\EntityType\User $account * (optional) The user for which to check access, or NULL to check access * for the current user. Defaults to NULL. * @@ -40,7 +40,7 @@ public function viewAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAULT * @param string $langcode * (optional) The language code for which to check access. Defaults to * LANGUAGE_DEFAULT. - * @param \Drupal\user\Plugin\Core\Entity\User $account + * @param \Drupal\user\EntityType\User $account * (optional) The user for which to check access, or NULL to check access * for the current user. Defaults to NULL. * @@ -57,7 +57,7 @@ public function createAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAU * @param string $langcode * (optional) The language code for which to check access. Defaults to * LANGUAGE_DEFAULT. - * @param \Drupal\user\Plugin\Core\Entity\User $account + * @param \Drupal\user\EntityType\User $account * (optional) The user for which to check access, or NULL to check access * for the current user. Defaults to NULL. * @@ -74,7 +74,7 @@ public function updateAccess(EntityInterface $entity, $langcode = LANGUAGE_DEFAU * @param string $langcode * (optional) The language code for which to check access. Defaults to * LANGUAGE_DEFAULT. - * @param \Drupal\user\Plugin\Core\Entity\User $account + * @param \Drupal\user\EntityType\User $account * (optional) The user for which to check access, or NULL to check access * for the current user. Defaults to NULL. * diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index 0367e11..f1a69a2 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -9,8 +9,6 @@ use Drupal\Component\Utility\NestedArray; use Drupal\Component\Plugin\Discovery\DiscoveryInterface; -use Drupal\Component\Plugin\Factory\FactoryInterface; -use Drupal\Component\Plugin\Mapper\MapperInterface; use Drupal\Component\Plugin\Factory\DefaultFactory; use Drupal\Core\Plugin\Discovery\AlterDecorator; use Drupal\Core\Plugin\Discovery\InfoHookDecorator; @@ -169,7 +167,7 @@ * @see entity_get_info() * @see hook_entity_info_alter() */ -class EntityManager implements DiscoveryInterface, FactoryInterface, MapperInterface { +class EntityManager implements DiscoveryInterface { /** * The object that discovers classes managed by this manager. @@ -179,20 +177,6 @@ class EntityManager implements DiscoveryInterface, FactoryInterface, MapperInter protected $discovery; /** - * The object that instantiates classes managed by this manager. - * - * @var Drupal\Component\Plugin\Factory\FactoryInterface - */ - protected $factory; - - /** - * The object that returns the preconfigured entity type instance appropriate for a particular runtime condition. - * - * @var Drupal\Component\Plugin\Mapper\MapperInterface - */ - protected $mapper; - - /** * The cache bin used for entity type definitions. * * @var string @@ -291,20 +275,6 @@ public function getDefinitions() { } /** - * Implements \Drupal\Component\Plugin\Factory\FactoryInterface::createInstance(). - */ - public function createInstance($plugin_id, array $configuration = array()) { - return $this->factory->createInstance($plugin_id, $configuration); - } - - /** - * Implements \Drupal\Component\Plugin\Mapper\MapperInterface::getInstance(). - */ - public function getInstance(array $options) { - return $this->mapper->getInstance($options); - } - - /** * Performs extra processing on definitions. * * @param array $definition diff --git a/core/lib/Drupal/Core/Entity/Field/Type/EntityTranslation.php b/core/lib/Drupal/Core/Entity/Field/Type/EntityTranslation.php index 280fca9..c1a2cfa 100644 --- a/core/lib/Drupal/Core/Entity/Field/Type/EntityTranslation.php +++ b/core/lib/Drupal/Core/Entity/Field/Type/EntityTranslation.php @@ -233,7 +233,7 @@ public function isEmpty() { /** * Implements AccessibleInterface::access(). */ - public function access($operation = 'view', \Drupal\user\Plugin\Core\Entity\User $account = NULL) { + public function access($operation = 'view', \Drupal\user\EntityType\User $account = NULL) { $method = $operation . 'Access'; return entity_access_controller($this->parent->entityType())->$method($this->parent, $this->langcode, $account); } diff --git a/core/lib/Drupal/Core/Entity/Field/Type/Field.php b/core/lib/Drupal/Core/Entity/Field/Type/Field.php index cc5951c..65cf032 100644 --- a/core/lib/Drupal/Core/Entity/Field/Type/Field.php +++ b/core/lib/Drupal/Core/Entity/Field/Type/Field.php @@ -10,7 +10,7 @@ use Drupal\Core\Entity\Field\FieldInterface; use Drupal\Core\TypedData\TypedDataInterface; use Drupal\Core\TypedData\Type\TypedData; -use Drupal\user\Plugin\Core\Entity\User; +use Drupal\user\EntityType\User; use ArrayIterator; use IteratorAggregate; use InvalidArgumentException; diff --git a/core/lib/Drupal/Core/TypedData/AccessibleInterface.php b/core/lib/Drupal/Core/TypedData/AccessibleInterface.php index d120584..39e4325 100644 --- a/core/lib/Drupal/Core/TypedData/AccessibleInterface.php +++ b/core/lib/Drupal/Core/TypedData/AccessibleInterface.php @@ -22,7 +22,7 @@ * - update * - delete * Defaults to 'view'. - * @param \Drupal\user\Plugin\Core\Entity\User $account + * @param \Drupal\user\EntityType\User $account * (optional) The user for which to check access, or NULL to check access * for the current user. Defaults to NULL. * @@ -32,6 +32,6 @@ * * @todo Don't depend on module level code. */ - public function access($operation = 'view', \Drupal\user\Plugin\Core\Entity\User $account = NULL); + public function access($operation = 'view', \Drupal\user\EntityType\User $account = NULL); } diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityAccessTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityAccessTest.php index 1b40c2d..d199bb2 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityAccessTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityAccessTest.php @@ -10,7 +10,7 @@ use Drupal\Core\Language\Language; use Drupal\Core\TypedData\AccessibleInterface; use Drupal\simpletest\WebTestBase; -use Drupal\user\Plugin\Core\Entity\User; +use Drupal\user\EntityType\User; /** * Tests the entity access controller. diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestAccessController.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestAccessController.php index d79fa68..6e02471 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestAccessController.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/EntityTestAccessController.php @@ -9,7 +9,7 @@ use Drupal\Core\Entity\EntityInterface; use Drupal\Core\Entity\EntityAccessControllerInterface; -use Drupal\user\Plugin\Core\Entity\User; +use Drupal\user\EntityType\User; /** * Defines the access controller for the test entity type. diff --git a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php index c75bca2..84b4682 100644 --- a/core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php +++ b/core/modules/views/views_ui/lib/Drupal/views_ui/ViewUI.php @@ -991,7 +991,7 @@ public function language() { /** * Implements \Drupal\Core\TypedData\AccessibleInterface::access(). */ - public function access($operation = 'view', \Drupal\user\Plugin\Core\Entity\User $account = NULL) { + public function access($operation = 'view', \Drupal\user\EntityType\User $account = NULL) { return $this->__call(__FUNCTION__, func_get_args()); }