I am unable to access the delta property from layout builder's block forms. I've had a look into the code and searched for issues and found the parent issue / related issue i've attached, but from those, I can't see a getDelta function to access the protected delta property in the Drupal\layout_builder\Form\ConfigureBlockFormBase class.
I'm not sure if i'm missing something that is in the component or section, but when trying to debug them, neither have the delta property. Either adding a getDelta function to the ConfigureBlockFormBase class or elsewhere would obviously sort this.
Hope someone can help with this
Comments
Comment #2
tim.plunkettWhat is the use case for needing the delta?
Comment #3
BryanLund commentedI'm trying to add a custom block generated through code to a section in the layout builder and from my understanding the delta is which section you're in? So i'm wanting to make sure the block gets saved to the right section. I couldn't see any documentation saying how to add a block generated through code to the layout builder (apologies if there is some somewhere). I managed to add the block fine, but none of the contextual links were loading by default. I had a look into the layout builder code and noticed the contextual links were added as:
I've managed to get the rest of the parameters, but couldn't see a way of getting delta. Apologies again if there is some documentation somewhere for this, but I haven't seen any. Also, happy to go down a different route if there's a better way that you could advise, thanks!