->setTargetBundle($bundle);
// Notify the entity storage that our field is gone.
\Drupal::entityManager()->onFieldDefinitionDelete($field_definitions['custom_bundle_field']);
->setTargetBundle($bundle);
// Notify the entity storage that our field is gone.
\Drupal::entityManager()->onFieldDefinitionDelete($field_definitions['custom_bundle_field']);