- π§πͺBelgium Wim Leers Ghent π§πͺπͺπΊ
Yes, I think this should be closed.
See you in π The core block_settings schema defines schema for block_content blocks Needs work .
public static function lazyBuilder($entity_id, $view_mode) {
return static::buildPreRenderableBlock(entity_load('block', $entity_id), \Drupal::service('module_handler'));
}
The $view_mode parameter is ignored. Doing something like
\Drupal::entityTypeManager()->getViewBuilder('block')->view($block, 'custom_view_mode');
results in the block being displayed in the 'default' view mode and not 'custom_view_mode'.
I'm not familiar enough with the D8 block systems but it seems it's due to the fact that regular block does not have view modes. The 'block_content' or custom blocks however does (the viewbuilder is quite different in that case).
So I don't know if the parameter should be removed or used ? My use case was making a custom block by extending BlockBase since this block would return always the same content (via the build method). and then having multiple view mode for this block (to get multiples templates).
???
Not clear.
NONE
Maybe ?
NONE
Closed: works as designed
9.5
Last updated
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Yes, I think this should be closed.
See you in π The core block_settings schema defines schema for block_content blocks Needs work .