Skip to content

Instantly share code, notes, and snippets.

@JPustkuchen
Created February 9, 2022 15:27
Show Gist options
  • Save JPustkuchen/b07f719523e9d58b502c4175027289bf to your computer and use it in GitHub Desktop.
Save JPustkuchen/b07f719523e9d58b502c4175027289bf to your computer and use it in GitHub Desktop.
Drupal 8 / 9: Delete Entity Bundle ($configEntityBildText)
<?php
// Delete paragraph example_bundle bundle!
/** @var \Drupal\Core\Config\Entity\ConfigEntityStorage $entity_storage */
$entity_storage = \Drupal::entityTypeManager()->getStorage('paragraphs_type');
$configEntityBildText = $entity_storage->load('example_bundle');
$configEntityBildText->delete();
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment