Change record status: 
Project: 
Introduced in branch: 
8.x
Description: 

In Drupal 7, bundles and view modes were defined in hook_entity_info():

/**
 * Implements hook_entity_info().
 */
function user_entity_info() {
  $return = array(
    'user' => array(
      'label' => t('User'),
      // ...
      'bundles' => array(
        'user' => array(
          'label' => t('User'),
          'admin' => array(
            'path' => 'admin/config/people/accounts',
            'access arguments' => array('administer users'),
          ),   
        ),   
      ),   
      'view modes' => array(
        'full' => array(
          'label' => t('User account'),
          'custom settings' => FALSE,
        ),   
      ),   
    ),   
  );
  return $return;
}

In Drupal 8, there is a hook for bundle information and view mode information is defined in config files, while other information is now in annotations (see change record Entity types are annotated plugins).

/**
 * Implements hook_entity_bundle_info().
 */
function user_entity_bundle_info() {
  $bundles['user']['user'] = array(
    'label' => t('User'),
    'admin' => array(
      'path' => 'admin/config/people/accounts',
    ),   
  );
  return $bundles;
}

Example of view mode in core/modules/user/config/install/entity.view_mode.user.full.yml:

id: user.full
label: 'User account'
status: false
cache: true
targetEntityType: user

So, to access this data now you can use entity_get_bundles($entity_type_id) and \Drupal::entityManager->getViewModes($entity_type_id) respectively.

There are also corresponding alter hooks in Drupal 8:

/**
 * Implements hook_entity_bundle_info_alter().
 */
function user_entity_bundle_info_alter(&$bundles) {
  $bundles['user']['user']['label'] = t('Full account');
}

/**
 * Implements hook_entity_view_mode_alter().
 */
function user_entity_view_mode_info_alter(&$view_modes) {
  $view_modes['user']['full']['status'] = TRUE;
}
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