Quantcast
Viewing all articles
Browse latest Browse all 292851

Fix name retrieving for block plugins to fix hook_block_view_NAME_alter()

Not getting any result by doing hook_block_view_NAME_alter() as in BlockRenderController->viewMultiple the name is being retrieved from the entity like this

list(, $name) = $entity->id();

But id is a string, i.e. bartik.content and that would result in hook_block_view_bartik.content_alter, a simple explode is needed here

list(, $name) = explode('.', $entity->id());


Viewing all articles
Browse latest Browse all 292851

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>