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 the 'Print' view mode for nodes.
$entity_info['node']['view_modes']['print'] = array(
'label' => t('Print'),
'custom_settings' => FALSE,
);
}