ScriptTraces::
addDeprecationNotice($hook->
getDeprecationNotice());
} $template =
$twig->
load($script->
getName());
if (!
$hook instanceof FunctionHook
) { $template->
render(['hook' =>
$hook]);
return;
} $blockName =
$hook->
getFunctionName();
if ($template->
hasBlock($blockName)) { $template->
renderBlock($blockName,
['hook' =>
$hook]);
return;
} if (!
$hook instanceof OptionalFunctionHook
) { throw new \
RuntimeException(sprintf( 'Required function "%s" missing in script "%s", please make sure you add the required block in your script.',
$hook->
getFunctionName(),
$script->
getName() ));