Is it possible to load a webform that is using a specific custom handler? I have a custom handler for one of our webforms, it may be re-used for other webforms. It integrates with a 3rd party API and sends the response back to Drupal.
I have to save the submissions to handle the response.
I`m wondering if its possible to load all webforms which are using this custom handler?
My goal is delete submissions of those webforms when they are older than a certain time.
You can use the next code:
$webforms = \Drupal::entityTypeManager()-&gt;getStorage('webform')-&gt;loadMultiple();
  foreach ($webforms as $webform) {
    foreach ($webform-&gt;getHandlers() as $handler) {
      if ($handler-&gt;getPluginId() == 'your_custom_handler') {
        // do your logic.
        break;
      }
    }
  }