| @@ 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. |
|
| @@ 300-311 (lines=12) @@ | ||
| 297 | * |
|
| 298 | * @return array |
|
| 299 | */ |
|
| 300 | protected function getDataForPrint() |
|
| 301 | { |
|
| 302 | $decoratedData = $this->getAjaxResponseData(); |
|
| 303 | ||
| 304 | return array_map(function ($row) { |
|
| 305 | if ($columns = $this->printColumns()) { |
|
| 306 | return $this->buildPrintColumn($row, $columns); |
|
| 307 | } |
|
| 308 | ||
| 309 | return $row; |
|
| 310 | }, $decoratedData); |
|
| 311 | } |
|
| 312 | ||
| 313 | /** |
|
| 314 | * Get printable columns. |
|