Accessing child block within nested blocks


I have a block within a block:


and I can’t figure out how to access the second block. Odd thing is that twig has no issues with it if I iterate over the first block, it finds the second block by name; however, I can’t do this from the PHP console.


A dump in twig shows that it finds it:


I’ve since switched to a image gallery versus a block, but I need to get the data out of that block to move it into the gallery. PHP’s dump command does not have “blkMethodPhotos” in it.


Try getData() function in blocks. Something like

       foreach($measurementList as $measurement) {
         foreach($blkMethodPhotos as $photo) {

Yeap, this was what I needed. I was basically doing this but what I neglected to consider is that some of them are indeed null as they don’t have a value yet. I was looping through all the objects and of course the first one was this way so it threw me. Thanks.