.../Core/Block/MainContentBlockPluginInterface.php | 2 +- .../Core/Block/StatefulBlockPluginInterface.php | 26 ---------------------- core/modules/block/src/BlockViewBuilder.php | 5 ++--- .../src/Plugin/Block/ViewsExposedFilterBlock.php | 8 +------ 4 files changed, 4 insertions(+), 37 deletions(-) diff --git a/core/lib/Drupal/Core/Block/MainContentBlockPluginInterface.php b/core/lib/Drupal/Core/Block/MainContentBlockPluginInterface.php index 605edce..2516348 100644 --- a/core/lib/Drupal/Core/Block/MainContentBlockPluginInterface.php +++ b/core/lib/Drupal/Core/Block/MainContentBlockPluginInterface.php @@ -14,7 +14,7 @@ * * @ingroup block_api */ -interface MainContentBlockPluginInterface extends StatefulBlockPluginInterface { +interface MainContentBlockPluginInterface extends BlockPluginInterface { /** * Sets the main content render array. diff --git a/core/lib/Drupal/Core/Block/StatefulBlockPluginInterface.php b/core/lib/Drupal/Core/Block/StatefulBlockPluginInterface.php deleted file mode 100644 index 83c28c6..0000000 --- a/core/lib/Drupal/Core/Block/StatefulBlockPluginInterface.php +++ /dev/null @@ -1,26 +0,0 @@ -moduleHandler->alter(['block_build', "block_build_" . $plugin->getBaseId()], $build[$entity_id], $plugin); - if ($plugin instanceof StatefulBlockPluginInterface) { + if ($plugin instanceof MainContentBlockPluginInterface) { // Immediately build a #pre_render-able block, since this block cannot // be built lazily. $build[$entity_id] += static::buildPreRenderableBlock($entity, $this->moduleHandler()); diff --git a/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php b/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php index ee46ead..f38d485 100644 --- a/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php +++ b/core/modules/views/src/Plugin/Block/ViewsExposedFilterBlock.php @@ -7,8 +7,6 @@ namespace Drupal\views\Plugin\Block; -use Drupal\Core\Block\StatefulBlockPluginInterface; - /** * Provides a 'Views Exposed Filter' block. * @@ -17,12 +15,8 @@ * 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 { +class ViewsExposedFilterBlock extends ViewsBlockBase { /** * {@inheritdoc}