function getRecords($source = 'cache') { if (!$this->isPrePopulated) { //If the record list has not been pre populated, do so now $this->getRecordData(); } //Get the record data according to the records returned in prePopulate $records = array(); foreach ($this->records as $rData) { if ($this->source == 'cache') { $records[] = \Concrete\Package\Formify\Src\FormifyRecord::getFromArray($rData); } else { $r = \Concrete\Package\Formify\Src\FormifyRecord::get($rData['rID'], 'db'); $r->cache(); } } return $records; }