public function FrxData::group in Forena Reports 7.4
Iterate the data based on the provided path.
Parameters
$path xpath to iterate xml on:
$group grouping value:
$sort Sort criteria:
File
- ./
FrxData.inc, line 343
Class
Code
public function group($data, $group = '') {
$rows = array();
if (is_array($group)) {
$group = implode(' ', $group);
}
$group = (string) $group;
if (is_array($data) || is_object($data)) {
foreach ($data as $row) {
Frx::Data()
->push($row, '_group');
$gval = $this->teng
->replace($group, TRUE);
Frx::Data()
->pop();
$rows[$gval][] = $row;
}
}
return $rows;
}