Implements hook_entity_bundle_rename().
function field_ui_entity_bundle_rename($entity_type, $bundle_old, $bundle_new) {
// When a bundle is renamed, the menu needs to be rebuilt to add our
// menu item tabs.
Drupal::state()
->set('menu_rebuild_needed', TRUE);
}