Implements hook_entity_bundle_info_alter().
function entity_test_entity_bundle_info_alter(&$bundles) {
$entity_info = entity_get_info();
foreach ($bundles as $entity_type => $info) {
if ($entity_info[$entity_type]['module'] == 'entity_test') {
$bundles[$entity_type] = Drupal::state()
->get($entity_type . '.bundles') ?: array(
$entity_type => array(
'label' => 'Entity Test Bundle',
),
);
}
}
}