diff --git a/core/includes/entity.inc b/core/includes/entity.inc index 7974a94..31bbf42 100644 --- a/core/includes/entity.inc +++ b/core/includes/entity.inc @@ -215,9 +215,9 @@ function entity_delete_multiple($entity_type, array $ids) { * A new entity object. * * @deprecated in Drupal 8.x-dev, will be removed before Drupal 9.0.0. Use - * the ::create() method if the entity type is known or - * \Drupal\Core\Entity\EntityManager::create() if the entity type is - * variable. + * the ::create($values) method if the entity type is known or + * \Drupal::entityManager()->getStorage($entity_type)->create($values) if the + * entity type is variable. */ function entity_create($entity_type, array $values = array()) { return \Drupal::entityManager() diff --git a/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php index f5ff905..4861138 100644 --- a/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -1438,22 +1438,4 @@ protected function deleteLastInstalledFieldStorageDefinition(FieldStorageDefinit $this->setLastInstalledFieldStorageDefinitions($entity_type_id, $definitions); } - /** - * Constructs a new entity object, without permanently saving it. - * - * @param string $entity_type - * The type of the entity. - * @param array $values - * (optional) An array of values to set, keyed by property name. If the - * entity type has bundles, the bundle key has to be specified. - * - * @return \Drupal\Core\Entity\EntityInterface - * A new entity object. - */ - public static function create($entity_type, array $values = array()) { - return \Drupal::entityManager() - ->getStorage($entity_type) - ->create($values); - } - }