protected function setPeriod($dateFrom, $dateTo) { parent::setPeriod($dateFrom, $dateTo); if (strtotime($this->dateFrom) < strtotime($this->campaign->date_start)) { $this->dateFrom = $this->campaign->date_start; } if (strtotime($this->dateTo) > strtotime($this->campaign->date_end)) { $this->dateTo = $this->campaign->date_end; } }
protected function formatTable(PHPExcel_Worksheet $activeSheet, $x1, $y1, $x2, $y2, $customParameters = array()) { parent::formatTable($activeSheet, $x1, $y1, $x2, $y2, $customParameters); $activeSheet->getStyle($x2 . $y1 . ':' . $x2 . $y2)->applyFromArray(array('alignment' => array('horizontal' => PHPExcel_Style_Alignment::HORIZONTAL_LEFT, 'vertical' => PHPExcel_Style_Alignment::VERTICAL_CENTER))); }