filterValues($values); return $values; } private function filterValues($values) { $values = array_filter((array) $values, function ($row) { $data = Qs_Array::map($row, ['name', 'location', 'result']); $data = array_filter($data); return !empty($data); }); return $values; } protected function getRows() { $defaults = [ ['type' => Education::HIGH_SCHOOL], ['type' => Education::UNIVERSITY], ['type' => Education::VOCATIONAL_SCHOOL] ]; $rows = Qs_Array::group(parent::getRows(), 'type', []); $defaults = Qs_Array::group($defaults, 'type', []); $rows = array_values(array_merge($defaults, $rows)); return $rows; } }