I created a custom block "admin/structure/block/block-content. "
How to get a field from a custom block by code?
I tried with the function block_loadand entity_load, but did not get the expected result.
Please help me solve the problem.
$ block = \ Drupal :: entityManager () → getStorage ('block') → load ($ block_id);
$ block_view = \ Drupal :: entityManager () → getViewBuilder ('block') → view ($ block);
http://i.stack.imgur.com/fOuSW.png
thank
source
share