Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.
Can you try to be a bit more specific. It is very hard to give a good answer when the question is as vague as it is right now. For example: what do you mean be reference? Do you want to create a link to the block? do you want to display the block? do you want to get metadata information about the block? How did you define the block_type (code snippet)?
P.S. you don't need the block_type for an entity_reference field to the block entity. It is a configuration entity and you only need the id of the block instance.
I have added a picture in question where it asks for bundles to reference a block. I have a custom form in a block, therefore i wrote it programmatically. I want to display that block in a node using paragraphs module . I couldn't find anywhere how to specify the bundle for the block? This is my annotation for the custom block. /** * Provides Custom Block. * * @Block( * id = "connected_block", * admin_label = @Translation("Connected Block with Form"), * category = @Translation("Blocks") * ) */
/** * Provides Custom Block. * * @Block( * id = "connected_block", * admin_label = @Translation("Connected Block with Form"), * category = @Translation("Blocks") * ) */