/** * Method for restructure Data * with JSON values */ private function exportDataRestruct($results) { $cuctom_columns = $this->getCustomColumns(); $new_results = array(); foreach ($results as $result) { unset($result['Data']); if (count($cuctom_columns)) { $fcrequest = FcRequestQuery::create()->findPk($result['Id']); $custom_result = $this->getCustomResult($fcrequest, $cuctom_columns); $new_results[] = array_merge($result, $custom_result); } else { $new_results[] = $result; } } return new CustomColumnsSourceIterator($new_results); }
public function getCountTodayRequests() { return FcRequestQuery::create()->filterByFcForm($this)->filterByCreatedAt(array('min' => date('Y-m-d 00:00:00'), 'max' => date('Y-m-d 23:23:59')))->count(); }