protected function loadResourcesFromTheme(string
$cacheKey, mixed &
$theme) { if (!
$theme instanceof Template
) { $theme =
$this->environment->
load($theme)->
unwrap();
} // Store the first Template instance that we find so that
// we can call displayBlock() later on. It doesn't matter *which*
// template we use for that, since we pass the used blocks manually
// anyway.
$this->template ??=
$theme;
// Use a separate variable for the inheritance traversal, because
// theme is a reference and we don't want to change it.
$currentTheme =
$theme;