Lines Matching defs:group_opts
99 * $group_opts grouping options for the mgroup function
107 $group_opts = [];
357 $group_opts['key'][$idx] = $key;
358 $group_opts['type'][$idx] = $group_by;
359 $group_opts['dformat'][$idx] = $wformat[$key];
364 return [$sort_array, $sort_opts, $group_opts];
691 * @param mixed $group_opts : AS ARRAY:
692 * $group_opts['key'][<order>] = column key to group by
693 * $group_opts['type'][<order>] = grouping type [MGROUP...]
694 * $group_opts['dformat'][<order>] = date formatting string
699 final public function mgroup(array $sort_array, array $keys, $group_opts = []): array
707 } elseif (empty($group_opts)) {
716 $level = count($group_opts['key']) - 1;
718 $this->addHeading($results, $sort_array, $group_opts, $level, $idx, $prevs);
733 private function addHeading(&$results, $sort_array, $group_opts, $level, $idx, &$prevs): void
739 $this->addHeading($results, $sort_array, $group_opts, $level - 1, $idx, $prevs);
741 $group_type = $group_opts['type'][$level];
744 $key = $group_opts['key'][$level];
750 $date_format = $group_opts['dformat'][$level];