コード例 #1
0
 /**
  * 
  * @param type $year
  * @todo jāpieliek $year kontrole
  */
 public function actionLevel1($year = false)
 {
     if (!$year) {
         $year = date('Y');
     }
     //dates
     $months = FdpeDimPeriod::getYearMonths($year);
     //main positions
     $positions = Fdm1Dimension1::getPositions($year);
     //body
     $data = FddpDimDataPeriod::getDataLevelDim1($year);
     //table
     $table = FddpDimDataPeriod::createTable($months, $positions, $data);
     //totals
     $totals = FddpDimDataPeriod::calcTotoals($table);
     $this->render('level1', array('year' => $year, 'months' => $months, 'positions' => $positions, 'table' => $table, 'rows_totals' => $totals['row'], 'columns_totals' => $totals['column'], 'total' => $totals['total']));
 }