This function was copied from develop's phpbb_template_asset class