Change record status: 
Project: 
Introduced in branch: 
8.x
Introduced in version: 
8.0-ALPHA12
Description: 

To simplify loading entities of a known type, the static methods load() and loadMultiple() have been added to entity classes.

Before:

$node = node_load(1);
$node = user_load_multiple(array(1, 2, 3));
// Not all entity types had their own functions to load them.
$format = entity_load('filter_format', 1);

After:

use \Drupal\node\Entity\Node;
use \Drupal\user\Entity\User;
use \Drupal\filter\Entity\FilterFormat;

$node = Node::load(1);
$users = User::loadMultiple(array(1, 2, 3));
$format = FilterFormat::load(1);

Additionally, $EntityType::create() was added to create new entities:

Before (there was no equivalent in 7.x):

$node = entity_create('node', array('title' => 'My title'));

8.x:

$node = Node::create(array('title' => 'My title'));

Advantages of the new methods:
- They work on all entity types, assuming that the entity type is specified in a single entity type definition, or there is exactly one subclass specified in an entity type definition (in case the definition was altered to use a different implementation)
- The @return static documentation ensures that type hints for that specific entity type work, which is not the case for entity_load() or \Drupal::entityManager()->getStorage($entity_type)->load()

Note that those methods do not work if the entity type is dynamic and it involves calling the dependency injection container, classes that use injected dependencies should rely on an injected entity manager and/or entity storage.

Impacts: 
Module developers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done