if ($hook instanceof StoppableHook &&
$hook->
isPropagationStopped()) { break;
} } } private function render(Hook
$hook, Script
$script): void
{ $twig =
$this->
initEnv($script);
$services =
$this->
initServices($hook,
$script);
$twig->
addGlobal('services',
$services);
$this->traces->
trace($hook,
$script,
function DDebug
$debug) use ($twig,
$script,
$hook): void
{ $twig->
addGlobal('debug',
$debug);
if ($hook instanceof DeprecatedHook
) { ScriptTraces::
addDeprecationNotice($hook->
getDeprecationNotice());
} $template =
$twig->
load($script->
getName());