public function getCalendarStructure()
 {
     $end_date = clone $this->config->getStartDate();
     $end_date->add($this->config->getInterval());
     $period = new \DatePeriod($this->config->getStartDate(), new \DateInterval('P1D'), $end_date);
     $cal = array();
     foreach ($period as $date) {
         $year = $date->format('Y');
         $month = $date->format('n');
         $day = $date->format('j');
         $quarter = (int) ceil($month / 3);
         $week = $date->format('W');
         $week_day = $date->format('w');
         if (!array_key_exists($year, $cal)) {
             $cal[$year] = array('type' => 'year', 'value' => $year, 'data' => $this->setDataInElement($date, 'year_callback'), 'elements' => array());
         }
         if (!array_key_exists($quarter, $cal[$year]['elements'])) {
             $cal[$year]['elements'][$quarter] = array('type' => 'quarter', 'value' => $quarter, 'data' => $this->setDataInElement($date, 'quarter_callback'), 'elements' => array());
         }
         if (!array_key_exists($month, $cal[$year]['elements'][$quarter]['elements'])) {
             $cal[$year]['elements'][$quarter]['elements'][$month] = array('type' => 'month', 'value' => $month, 'data' => $this->setDataInElement($date, 'month_callback'), 'elements' => array());
         }
         if (!array_key_exists($week, $cal[$year]['elements'][$quarter]['elements'][$month]['elements'])) {
             $cal[$year]['elements'][$quarter]['elements'][$month]['elements'][$week] = array('type' => 'week', 'value' => $week, 'data' => $this->setDataInElement($date, 'week_callback'), 'elements' => array());
         }
         if (!array_key_exists($day, $cal[$year]['elements'][$quarter]['elements'][$month]['elements'][$week]['elements'])) {
             $cal[$year]['elements'][$quarter]['elements'][$month]['elements'][$week]['elements'][$day] = array('type' => 'day', 'value' => $day, 'data' => $this->setDataInElement($date, 'day_callback'), 'weekday' => $week_day);
         }
     }
     $cal = $this->config->getFormatter()->setFormat($cal);
     return $cal;
 }