private readonly Environment
$twig,
private readonly ServiceReferenceGenerator
$serviceReferenceGenerator ) { $this->docFactory = DocBlockFactory::
createInstance([ 'hook-use-case' => Generic::
class,
'script-service' => Generic::
class,
]);
} public function generate(): array
{ $hookClassNames =
$this->
getHookClasses();
$data =
$this->
getHookData($hookClassNames);
$originalLoader =
$this->twig->
getLoader();
$this->twig->
setLoader(new ArrayLoader([ 'hook-reference.md.twig' =>
file_get_contents(self::TEMPLATE_FILE
),
]));
try { $result =
[