Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

7
  • Thanks Neograph734, That's mean the solution will be custom code, I will add button inside each Paragraph type edit form to delete all Paragraphs. Commented Jul 12, 2017 at 9:32
  • It depends on what you prefer. If you want some interface, the Views Bulk Option suggested by No Sssweat above might also work. It would allow you to create a view of paragraphs, add a condition for a type, add the VBO checkbox and use the delete action to delete them all. Might be more work to click together, but uses the batch api, which might work better for many many paragraphs. Commented Jul 12, 2017 at 9:35
  • I will check if I can delete Paragraphs using views and VBO and get back to you. Thanks in advance. Commented Jul 12, 2017 at 9:46
  • 1
    after checking views and all option inside views, It's kind of impossible to delete paragraphs using views. I Think the best solution is implement custom button inside each paragraph type to delete all paragraphs. Thanks. Commented Jul 12, 2017 at 12:59
  • 1
    Another way to do it may be like this $storage = \Drupal::entityTypeManager()->getStorage('paragraph'); $paragraphs = $storage->loadByProperties(array('type' => 'your_paragraph_type')); $storage->delete($paragraphs); Commented Oct 16, 2023 at 22:55