From bcbf4899c0e751ed0e9f8a7300b93d179d26c008 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Fri, 24 Jul 2015 16:28:10 +0100
Subject: [PATCH] Issue #2535284 by jibran: Move block_install hook to
 block.install file

---
 core/modules/block/block.install | 18 ++++++++++++++++++
 core/modules/block/block.module  | 11 -----------
 2 files changed, 18 insertions(+), 11 deletions(-)
 create mode 100644 core/modules/block/block.install

diff --git a/core/modules/block/block.install b/core/modules/block/block.install
new file mode 100644
index 000000000000..7010f59b0283
--- /dev/null
+++ b/core/modules/block/block.install
@@ -0,0 +1,18 @@
+<?php
+
+/**
+ * @file
+ * Contains install and update functions for Block.
+ */
+
+use Drupal\Core\Cache\Cache;
+
+/**
+ * Implements hook_install().
+ */
+function block_install() {
+  // Because the Block module upon installation unconditionally overrides all
+  // HTML output by selecting a different page display variant, we must
+  // invalidate all cached HTML output.
+  Cache::invalidateTags(['rendered']);
+}
diff --git a/core/modules/block/block.module b/core/modules/block/block.module
index 9ce0ac2687fb..7862e66d2057 100644
--- a/core/modules/block/block.module
+++ b/core/modules/block/block.module
@@ -7,7 +7,6 @@
 
 use Drupal\block\BlockInterface;
 use Drupal\Component\Utility\Html;
-use Drupal\Core\Cache\Cache;
 use Drupal\Core\Routing\RouteMatchInterface;
 use Drupal\Core\Url;
 use Drupal\language\ConfigurableLanguageInterface;
@@ -282,13 +281,3 @@ function block_configurable_language_delete(ConfigurableLanguageInterface $langu
     }
   }
 }
-
-/**
- * Implements hook_install().
- */
-function block_install() {
-  // Because the Block module upon installation unconditionally overrides all
-  // HTML output by selecting a different page display variant, we must
-  // invalidate all cached HTML output.
-  Cache::invalidateTags(['rendered']);
-}
-- 
GitLab