[ticket/13051] Add a new core event to handle the template array

PHPBB3-13051