@@ 159-163 (lines=5) @@ | ||
156 | protected function renderHeader($file) |
|
157 | { |
|
158 | $output = []; |
|
159 | foreach ($this->grid->getConfig()->getColumns() as $column) { |
|
160 | if (!$column->isHidden()) { |
|
161 | $output[] = $this->escapeString($column->getLabel()); |
|
162 | } |
|
163 | } |
|
164 | fputcsv($file, $output, static::CSV_DELIMITER); |
|
165 | } |
|
166 | } |
@@ 175-179 (lines=5) @@ | ||
172 | /** @var DataRow $row */ |
|
173 | while ($row = $provider->getRow()) { |
|
174 | $output = []; |
|
175 | foreach ($this->grid->getConfig()->getColumns() as $column) { |
|
176 | if ($this->isColumnExported($column)) { |
|
177 | $output[] = $this->escapeString($column->getValue($row)); |
|
178 | } |
|
179 | } |
|
180 | $exportData[] = $output; |
|
181 | } |
|
182 | return $exportData; |
|
@@ 209-213 (lines=5) @@ | ||
206 | protected function getHeaderRow() |
|
207 | { |
|
208 | $output = []; |
|
209 | foreach ($this->grid->getConfig()->getColumns() as $column) { |
|
210 | if ($this->isColumnExported($column)) { |
|
211 | $output[] = $this->escapeString($column->getLabel()); |
|
212 | } |
|
213 | } |
|
214 | return $output; |
|
215 | } |
|
216 |