Commit bcbf4899 authored by alexpott's avatar alexpott

Issue #2535284 by jibran: Move block_install hook to block.install file

parent c523c995
<?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']);
}
......@@ -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']);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment