public function ExportData::get in Loft Data Grids 7.2
Same name and namespace in other branches
- 6.2 vendor/aklump/loft_data_grids/src/AKlump/LoftDataGrids/ExportData.php \AKlump\LoftDataGrids\ExportData::get()
Get the data
Return value
array
Overrides ExportDataInterface::get
3 calls to ExportData::get()
- ExportData::getAllPageIds in vendor/
aklump/ loft_data_grids/ src/ AKlump/ LoftDataGrids/ ExportData.php - Return an array of all page ids
- ExportData::getCurrent in vendor/
aklump/ loft_data_grids/ src/ AKlump/ LoftDataGrids/ ExportData.php - Return the current record or data by key
- ExportData::getPage in vendor/
aklump/ loft_data_grids/ src/ AKlump/ LoftDataGrids/ ExportData.php - Return a single page of data
File
- vendor/
aklump/ loft_data_grids/ src/ AKlump/ LoftDataGrids/ ExportData.php, line 252
Class
Namespace
AKlump\LoftDataGridsCode
public function get() {
$return = $this->data;
if ($this->hiddenKeys !== array()) {
foreach ($return as $page_id => $page) {
// Jump to next page if there are none hidden here.
if (isset($this->hiddenKeys[$page_id]) && $this->hiddenKeys[$page_id] === array()) {
continue;
}
foreach ($page as $pointer => $record) {
foreach ($record as $key => $value) {
if (isset($this->hiddenKeys[$page_id]) && in_array($key, $this->hiddenKeys[$page_id])) {
unset($return[$page_id][$pointer][$key]);
}
}
}
}
}
return $return;
}