Programmatically get webform submissions of a specific nodes webform In Drupal 8 there is no function webform_get_submissions() as of this writing.

Webforms can be attached to nodes.
How to get all the submissions of a webform that belong to a specific node (e. g. node ID = 15):

webform_get_submissions_by_node_id() ... is the wanted function.

There are similar questions here but the PHP code to get only the submissions which where created on one specific node is different. And for this there is still now answer to find.
Thank you 4k4. Here is now the correct and full code for use in mytheme.theme file (we need the getData() function:

$storage = \Drupal::entityTypeManager()-&gt;getStorage('webform_submission');
$webform_submission = $storage-&gt;loadByProperties([
  'entity_type' =&gt; 'node',
  'entity_id' =&gt; $variables['node']-&gt;id(),
]);
$submission_data = array();
foreach ($webform_submission as $submission) {
  $submission_data[] = $submission-&gt;getData();
}