@@ 132-143 (lines=12) @@ | ||
129 | * |
|
130 | * @return array |
|
131 | */ |
|
132 | protected function getDataForExport() |
|
133 | { |
|
134 | $decoratedData = $this->getAjaxResponseData(); |
|
135 | ||
136 | return array_map(function ($row) { |
|
137 | if (is_array($this->exportColumns)) { |
|
138 | return array_only($row, $this->exportColumns); |
|
139 | } |
|
140 | ||
141 | return $row; |
|
142 | }, $decoratedData); |
|
143 | } |
|
144 | ||
145 | /** |
|
146 | * Get mapped columns versus final decorated output. |
|
@@ 150-161 (lines=12) @@ | ||
147 | * |
|
148 | * @return array |
|
149 | */ |
|
150 | protected function getDataForPrint() |
|
151 | { |
|
152 | $decoratedData = $this->getAjaxResponseData(); |
|
153 | ||
154 | return array_map(function ($row) { |
|
155 | if (is_array($this->printColumns)) { |
|
156 | return array_only($row, $this->printColumns); |
|
157 | } |
|
158 | ||
159 | return $row; |
|
160 | }, $decoratedData); |
|
161 | } |
|
162 | ||
163 | /** |
|
164 | * Get decorated data as defined in datatables ajax response. |