core/modules/block/block.module | 2 -- .../src/Plugin/Block/SystemPageMessagesBlock.php | 38 +--------------------- 2 files changed, 1 insertion(+), 39 deletions(-) diff --git a/core/modules/block/block.module b/core/modules/block/block.module index c3d1152..9e7d851 100644 --- a/core/modules/block/block.module +++ b/core/modules/block/block.module @@ -269,7 +269,6 @@ function template_preprocess_block(&$variables) { * @see drupal_render_page() */ function block_preprocess_page(&$variables) { - // Get active theme. $theme = \Drupal::theme()->getActiveTheme()->getName(); @@ -285,7 +284,6 @@ function block_preprocess_page(&$variables) { // Removes messages variable from page template if messages block is placed. unset($variables['messages']); } - } /** diff --git a/core/modules/system/src/Plugin/Block/SystemPageMessagesBlock.php b/core/modules/system/src/Plugin/Block/SystemPageMessagesBlock.php index ed494a5..ad2e5bd 100644 --- a/core/modules/system/src/Plugin/Block/SystemPageMessagesBlock.php +++ b/core/modules/system/src/Plugin/Block/SystemPageMessagesBlock.php @@ -23,43 +23,7 @@ * admin_label = @Translation("Page messages") * ) */ -class SystemPageMessagesBlock extends BlockBase implements ContainerFactoryPluginInterface { - - /** - * Stores the configuration factory. - * - * @var \Drupal\Core\Config\ConfigFactoryInterface - */ - protected $configFactory; - - /** - * Creates a SystemPageMessagesBlock instance. - * - * @param array $configuration - * A configuration array containing information about the plugin instance. - * @param string $plugin_id - * The plugin_id for the plugin instance. - * @param mixed $plugin_definition - * The plugin implementation definition. - * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory - * The factory for configuration objects. - */ - public function __construct(array $configuration, $plugin_id, $plugin_definition, ConfigFactoryInterface $config_factory) { - parent::__construct($configuration, $plugin_id, $plugin_definition); - $this->configFactory = $config_factory; - } - - /** - * {@inheritdoc} - */ - public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) { - return new static( - $configuration, - $plugin_id, - $plugin_definition, - $container->get('config.factory') - ); - } +class SystemPageMessagesBlock extends BlockBase { /** * {@inheritdoc}