Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / themes / contrib / bootstrap / src / Plugin / Alter / ThemeRegistry.php
index 7ff3ac7c51554bf4c5fe8cba3971e287e00acd12..36f64b50f4ce90657a85e45b088e7b70c0dde36b 100644 (file)
@@ -1,13 +1,7 @@
 <?php
-/**
- * @file
- * Contains \Drupal\bootstrap\Plugin\Alter\ThemeRegistry.
- */
 
-// Name of the base theme must be lowercase for it to be autoload discoverable.
 namespace Drupal\bootstrap\Plugin\Alter;
 
-use Drupal\bootstrap\Annotation\BootstrapAlter;
 use Drupal\bootstrap\Bootstrap;
 use Drupal\bootstrap\Plugin\PreprocessManager;
 use Drupal\Core\Theme\Registry;
@@ -83,7 +77,9 @@ class ThemeRegistry extends Registry implements AlterInterface {
     foreach ($this->currentTheme->getAncestry() as $ancestor) {
       $current_theme = $ancestor->getName() === $this->currentTheme->getName();
       $theme_path = $ancestor->getPath();
-      foreach ($ancestor->fileScan('/\.html\.twig$/', 'templates') as $file) {
+      // Scan entire theme root path.
+      // @see https://www.drupal.org/project/bootstrap/issues/2951575
+      foreach ($ancestor->fileScan('/\.html\.twig$/') as $file) {
         $hook = str_replace('-', '_', str_replace('.html.twig', '', $file->filename));
         $path = dirname($file->uri);
         $incomplete = !isset($cache[$hook]) || strrpos($hook, '__');