core/modules/block/src/BlockViewBuilder.php | 4 ++-- core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/core/modules/block/src/BlockViewBuilder.php b/core/modules/block/src/BlockViewBuilder.php index c4f8f50..0f0cc3c 100644 --- a/core/modules/block/src/BlockViewBuilder.php +++ b/core/modules/block/src/BlockViewBuilder.php @@ -72,7 +72,7 @@ public function viewMultiple(array $entities = array(), $view_mode = 'full', $la // Assign a #lazy_builder callback, which will generate a #pre_render- // able block lazily (when necessary). $build[$entity_id] += [ - '#lazy_builder' => [get_class($this) . '::lazyBuilder', [$entity_id, $view_mode, $langcode]], + '#lazy_builder' => [static::class . '::lazyBuilder', [$entity_id, $view_mode, $langcode]], ]; } } @@ -116,7 +116,7 @@ protected static function buildPreRenderableBlock($entity, ModuleHandlerInterfac '#derivative_plugin_id' => $derivative_id, '#id' => $entity->id(), '#pre_render' => [ - get_called_class() . '::preRender', + static::class . '::preRender', ], // Add the entity so that it can be used in the #pre_render method. '#block' => $entity, diff --git a/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php b/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php index 8a62972..ee46ead 100644 --- a/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php +++ b/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php @@ -17,6 +17,10 @@ * admin_label = @Translation("Views Exposed Filter Block"), * deriver = "Drupal\views\Plugin\Derivative\ViewsExposedFilterBlock" * ) + * + * This block uses (and thus depends on) the view that is being shown as the + * main content. It gets that view injected, so that it has the same view in the + * exact same state. Hence this block is stateful. */ class ViewsExposedFilterBlock extends ViewsBlockBase implements StatefulBlockPluginInterface {