Last updated on
14 August 2017

Handlers were previously known as Controllers. See Change Record.
While entities represent a piece of data, handlers are responsible for acting on and with them. Handlers of an entity can be accessed through the entity_type.manager service:


The storage handler implements EntityStorageInterface and will default to ContentEntityStorageBase, a handler that implements standard methods for crud operations.


The access handler implements EntityAccessControlHandlerInterface and will default to EntityAccessControlHandler

List Builder

The list builder implements EntityListBuilderInterface and will default to EntityListBuilder

View Builder

The view builder implements EntityViewBuilderInterface and will default to EntityViewBuilder


The form handler implements EntityFormInterface. Since EntityForm already implements that interface, you can extend it to provide classes for such high level operations as add, edit, and delete. You would then provide user access to those operations through routing.yml files. See the Drupal Examples project configuration entity example, src/Entity/Robot.php.

Example usage:

$storage = \Drupal::entityManager()->getStorage('node');

$storage->loadMultiple(array(1, 2, 3));
// Equaivalent to $node->save().
$new_node = $storage->create(array('title' => 'My awesome node'));