settings_tray.install 760 B

123456789101112131415161718192021222324
  1. <?php
  2. /**
  3. * @file
  4. * Install, update and uninstall functions for the Settings Tray module.
  5. */
  6. use Drupal\Core\Cache\Cache;
  7. /**
  8. * Implements hook_install().
  9. */
  10. function settings_tray_install() {
  11. // This module affects the rendering of blocks and of the page.
  12. // @todo Remove in https://www.drupal.org/node/2783791.
  13. Cache::invalidateTags(['rendered']);
  14. // \Drupal\Core\Menu\ContextualLinkManager caches per-group definitions
  15. // without associating the cache tag that would allow them to be cleared
  16. // by its clearCachedDefinitions() implementation that is automatically
  17. // invoked when modules are installed.
  18. // @todo Remove when that is fixed in https://www.drupal.org/node/2773591.
  19. \Drupal::service('cache.discovery')->deleteAll();
  20. }