Add to entity type definitions.
Modules may implement this hook to add information to defined entity types.
array $entity_info: An associative array of all entity type definitions, keyed by the entity type name. Passed by reference.
\Drupal\Core\Entity\EntityManager
Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.
function hook_entity_info(&$entity_info) {
// Add a form controller for a custom node form without overriding the default
// node form. To override the default node form, use hook_entity_info_alter()
// to alter $entity_info['node']['controllers']['form']['default'].
$entity_info['node']['controllers']['form']['mymodule_foo'] = 'Drupal\\mymodule\\NodeFooFormController';
}