| @@ 145-156 (lines=12) @@ | ||
| 142 | * |
|
| 143 | * @return array |
|
| 144 | */ |
|
| 145 | protected function getDataForExport() |
|
| 146 | { |
|
| 147 | $decoratedData = $this->getAjaxResponseData(); |
|
| 148 | ||
| 149 | return array_map(function ($row) { |
|
| 150 | if ($columns = $this->exportColumns()) { |
|
| 151 | return $this->buildExportColumn($row, $columns); |
|
| 152 | } |
|
| 153 | ||
| 154 | return $row; |
|
| 155 | }, $decoratedData); |
|
| 156 | } |
|
| 157 | ||
| 158 | /** |
|
| 159 | * Get decorated data as defined in datatables ajax response. |
|
| @@ 272-283 (lines=12) @@ | ||
| 269 | * |
|
| 270 | * @return array |
|
| 271 | */ |
|
| 272 | protected function getDataForPrint() |
|
| 273 | { |
|
| 274 | $decoratedData = $this->getAjaxResponseData(); |
|
| 275 | ||
| 276 | return array_map(function ($row) { |
|
| 277 | if ($columns = $this->printColumns()) { |
|
| 278 | return $this->buildPrintColumn($row, $columns); |
|
| 279 | } |
|
| 280 | ||
| 281 | return $row; |
|
| 282 | }, $decoratedData); |
|
| 283 | } |
|
| 284 | ||
| 285 | /** |
|
| 286 | * Get printable columns. |
|