Preheat oven to 180 C / Gas 4. Grease a 23cm round tart tin or line with baking parchment.
For the pastry:
Sift flour into a bowl and mix with salt. Rub in cold butter until the mixture resembles breadcrumbs. Add cream and knead to a dough (add a little more cream if necessary to form the dough). Form pastry dough into a ball, wrap in cling film and chill in the fridge for 20 minutes.
Meanwhile, heat oil in a saucepan over medium-low heat and slowly cook and stir the onions. Cook for 20 minutes, stirring occasionally until onions become soft and golden brown. Remove from the heat and set aside.
Dust a worktop and a rolling pin with flour and roll the pastry into a circular shape. Line the prepared 23cm round tin with the pastry. Prick the pastry a few times with a fork.
Bake in the oven for 10 minutes. Remove from the oven.
For the filling:
Meanwhile whisk together eggs and cream and stir in the garlic, salt, pepper and flour. Add the smoked salmon and lastly mix in the cheese and fried onions and pour the mixture into the pre-baked pastry case.
Return to the oven and bake for 50 to 55 minutes, until the filling is set. Let rest for at least 10 minutes, before serving.