Esempio n. 1
0
 /**
  * Add items to interval collection
  *
  * @param Collection $collection
  * @param string $from
  * @param string $to
  * @param string $periodType
  * @return void
  */
 public function prepareIntervalsCollection($collection, $from, $to, $periodType = self::REPORT_PERIOD_TYPE_DAY)
 {
     $intervals = $this->getIntervals($from, $to, $periodType);
     foreach ($intervals as $interval) {
         $item = $this->_itemFactory->create();
         $item->setPeriod($interval);
         $item->setIsEmpty();
         $collection->addItem($item);
     }
 }