diff --git a/core/core.services.yml b/core/core.services.yml index 7059b81..ba701f0 100644 --- a/core/core.services.yml +++ b/core/core.services.yml @@ -1040,7 +1040,7 @@ services: arguments: ['%app.root%'] twig.loader.theme_registry: class: Drupal\Core\Template\TwigThemeRegistryLoader - arguments: ['%app.root%', '@theme.registry'] + arguments: ['@theme.registry'] twig.loader.string: class: Twig_Loader_String element_info: diff --git a/core/lib/Drupal/Core/Template/TwigThemeRegistryLoader.php b/core/lib/Drupal/Core/Template/TwigThemeRegistryLoader.php index 59d16e5..86c0c9a 100644 --- a/core/lib/Drupal/Core/Template/TwigThemeRegistryLoader.php +++ b/core/lib/Drupal/Core/Template/TwigThemeRegistryLoader.php @@ -10,7 +10,7 @@ use Drupal\Core\Theme\Registry; /** - * Registers paths based on information from the Drupal theme registry. + * Loads templates based on information from the Drupal theme registry. * * Allows for template inheritance based on the currently active template. */ @@ -26,13 +26,10 @@ class TwigThemeRegistryLoader extends \Twig_Loader_Filesystem { /** * Constructs a new TwigThemeRegistryLoader object. * - * @param string|array $paths - * A path or an array of paths where to look for templates * @param \Drupal\Core\Theme\Registry $theme_registry * The theme registry. */ - public function __construct($paths = array(), Registry $theme_registry) { - parent::__construct($paths); + public function __construct(Registry $theme_registry) { $this->themeRegistry = $theme_registry; } @@ -66,7 +63,7 @@ protected function findTemplate($name) { } } - throw new \Twig_Error_Loader(sprintf('Unable to find template "%s" in the Drupal theme registry', $name)); + throw new \Twig_Error_Loader(sprintf('Unable to find template "%s" in the Drupal theme registry.', $name)); } }