Commit 6cf71a20 authored by alexpott's avatar alexpott

Issue #2346261 by DuaelFr, kmoll, Berdir: Deprecate entity_create() in favor...

Issue #2346261 by DuaelFr, kmoll, Berdir: Deprecate entity_create() in favor of a <EntityType>::create($values) or \Drupal::entityManager()->getStorage($entity_type)->create($values)
parent 23e7b477
......@@ -213,6 +213,11 @@ function entity_delete_multiple($entity_type, array $ids) {
*
* @return \Drupal\Core\Entity\EntityInterface
* A new entity object.
*
* @deprecated in Drupal 8.x-dev, will be removed before Drupal 9.0.0. Use
* the <EntityType>::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()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment