diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index cb722b7973d1fbf69a8195493565e06fded09042..101c8b71d0aad87836a8dc6af0592683cc60ec0f 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -137,27 +137,12 @@ public function __construct(\Traversable $namespaces, ContainerInterface $contai $this->namespaces = $namespaces; $this->translationManager = $translation_manager; - $this->doDiscovery($namespaces); - $this->factory = new DefaultFactory($this->discovery); - $this->container = $container; - } - - protected function doDiscovery($namespaces) { $this->discovery = new AnnotatedClassDiscovery('Entity', $namespaces, 'Drupal\Core\Entity\Annotation\EntityType'); $this->discovery = new InfoHookDecorator($this->discovery, 'entity_info'); $this->discovery = new AlterDecorator($this->discovery, 'entity_info'); $this->discovery = new CacheDecorator($this->discovery, 'entity_info:' . $this->languageManager->getLanguage(Language::TYPE_INTERFACE)->id, 'cache', CacheBackendInterface::CACHE_PERMANENT, array('entity_info' => TRUE)); - } - - /** - * {@inheritdoc} - */ - public function addNamespaces(\Traversable $namespaces) { - reset($this->namespaces); - $iterator = new \AppendIterator; - $iterator->append(new \IteratorIterator($this->namespaces)); - $iterator->append($namespaces); - $this->doDiscovery($iterator); + $this->factory = new DefaultFactory($this->discovery); + $this->container = $container; } /** diff --git a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php index 1d68242977a552a6802b03aeba37474fb9ee6763..0e898cb6d8c4f9319136d6cc6f2797bf36470992 100644 --- a/core/lib/Drupal/Core/Entity/EntityManagerInterface.php +++ b/core/lib/Drupal/Core/Entity/EntityManagerInterface.php @@ -138,20 +138,6 @@ public function getControllerClass($entity_type, $controller_type, $nested = NUL */ public function getAllBundleInfo(); - /** - * Add more namespaces to the entity manager. - * - * This is usually only necessary for uninstall purposes. - * - * @todo Remove this method, along with doDiscovery(), when - * https://drupal.org/node/1199946 is fixed. - * - * @param \Traversable $namespaces - * - * @see comment_uninstall() - */ - public function addNamespaces(\Traversable $namespaces); - /** * {@inheritdoc} */