I have a webform handler and I need to get all the file Ids of field type #webform_document_file. There are multiple of these fields with different field names but same type, would like to optimize the query.
something like
$webform_submission->getFieldDefinitionType('#webform_document_file')->getValue();
Can you please try something like this,