I have created a custom block "admin/structure/block/block-content
".
How to get the field from a custom block by code?
I have tried with block_load
function and entity_load
but did not get the expected result.
Please help me to solve it.
$block = \Drupal::entityManager()->getStorage('block')->load($block_id);
$block_view = \Drupal::entityManager()->getViewBuilder('block')->view($block);
https://i.stack.imgur.com/fOuSW.png
Thanks