Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / modules / contrib / devel / src / EventSubscriber / ThemeInfoRebuildSubscriber.php
index a0be6f17154b8f8adb72eb27f12a95b6b7082007..596e709b4a14e8b245b46e4e4495a7695f9aee51 100644 (file)
@@ -75,6 +75,10 @@ class ThemeInfoRebuildSubscriber implements EventSubscriberInterface {
       drupal_theme_rebuild();
       // Refresh theme data.
       $this->themeHandler->refreshInfo();
+      // Resets the internal state of the theme handler and clear the 'system
+      // list' cache; this allow to properly register, if needed, PSR-4
+      // namespaces for theme extensions after refreshing the info data.
+      $this->themeHandler->reset();
       // Notify the user that the theme info are rebuilt on every request.
       $this->triggerWarningIfNeeded($event->getRequest());
     }