How do I add a strong "onion flavor" to the biryani (in restaurant style)? I've had chicken biryani in restaurants and their biryanis taste extremely different from what we prepare at home. I'm not sure how to describe it except that it's an "onion flavor".

We've got loads of biryani recipes and they're all more or less the same.

After a lot of pondering over the difference, I've begun to suspect that the restaurants are doing either of these things (or a combination of them):


They're somehow adding an onion flavor. Either that or they're adding something else that has a strong pungent, sour flavor. 
They're adding an ingredient that gives a slight sweet taste. It's not tomato sauce, tomato puree, or sugar. There's something else. I've tried all of these methods.
Perhaps it's milk in some way. 


How can I give a strong "onion flavor" or something similar to it to my biryani? How are the restaurants doing it?

Edit: I ordered chicken biryani from the restaurant again and have added some pics. Please take a look at these pics to get an idea about this recipe/onion flavor. So far, no answer talks about creating the lump of onion shown in the pics. Those lumps of onions are the key to creating this flavor:

Pic of an "onion glob". This is the strangest thing in the recipe. There are globs of onions between the rice. These are basically lumps of onions that stick together. They resemble a pigeon's egg (size and shape-wise). I've crushed open an onion glob to show what it looks like.
Note: There are NO onions in the rice. Only the onion globs + chicken pieces (which contain very small pieces of onions).


Inferences: They are clearly not deep frying the onions. I believe deep frying them leads to crispyness. These onions aren't crisp.

2) Pic of the chicken pieces: Another surprising thing about the taste is that the chicken pieces taste almost the same as the onion globs, except they're sweeter. 


Inferences: I'm guessing that they've mixed tomato sauce with the chicken but can't say for sure. 

3) Pic of the rice:
The rice seems to have very little oil. It sticks to my fingers. I can see that half of it looks like plain rice. All of it has a very very strong onion-like smell.



Inferences: I suspect that the rice was cooked separately entirely. Then it was mixed with the onion globs, and steamed a little bit to catch that aroma.
The restaurants may be adding asafoetida, a ground root product that adds a savory, onion-y flavor to food. It's very concentrated stuff and smells awful, but once you cook it for awhile it's absolute magic.