I am working with a module. I have a node id. That node id is a page and it has 2 or more view blocks on it. The results of views are lists of nodes with file attachments.
I need to get all the files attached to the nodes outputted by the view on this particular page.
I work in a module file and I can supply the nid of type page where these views sit.
I could not find much help so I decided to ask for what would be the best way to approach this.
I am new to Drupal so I will appreciate a great explanation on how to approach this.