Пример #1
0
 private function renderFooter(\Core3\Model\Spreadsheet $model)
 {
     $footer = $model->getFooter();
     if (!count($footer)) {
         return '';
     }
     $html = '<tr>';
     $colspan = '';
     if (count($model->getColumns()) > count($footer)) {
         $padCnt = count($model->getColumns()) - count($footer) + 1;
         $colspan = ' colspan="' . $padCnt . '"';
         $html .= '<th' . $colspan . '>' . array_shift($footer) . '</th>';
     }
     foreach ($footer as $col) {
         $html .= '<th>' . $col . '</th>';
     }
     $html .= '</tr>';
     return $html;
 }