I'm getting prices and bookings from different sources in one flat booking table like this:
record 2014-06-07 2014-06-14 2014-06-21 2014-06-28
1 2000.00 2500.00 2500.00 3000.00
array(3) array(null) array(2) array(1)
2 3000.00 3500.00 3500.00 2800.00
array(null) array(1) array(null) array(null)
Now I need to render the columns with prices and bookings into a nice layout. So I wrote a custom twig extension and gave them prices and bookings as arguments.
So my question is: How can I render the result of the custom Twig_Function within the twig extension? Sometimes I need to render only the price and sometimes I need to render the price and 3 bookings within a week.
Before using the twig extension I tried to render a custom controller. But that was very slow because having lots of rows and columns in the table.