private readonly Environment
$twig ) { parent::
__construct();
} public function render(): string
{ $eventsDoc =
[];
$this->
collectBusinessEvent($eventsDoc);
$this->
collectEntityWrittenEvent($eventsDoc);
$originalLoader =
$this->twig->
getLoader();
$this->twig->
setLoader(new ArrayLoader([ 'hookable-events-list.md.twig' =>
file_get_contents(self::EVENTS_TEMPLATE
),
]));
try { return $this->twig->
render( 'hookable-events-list.md.twig',
['eventDocs' =>
$eventsDoc] );
}