public function getRecords()
    {
        $ids = $this->getRecordIDList();

        if ($ids) {
            $class = $this->gridField->list->dataClass;

            return DataList::create($class)->byIDs($ids);
        } else {
            return false;
        }
    }
public function getRecords()
    {
        $ids = $this->getRecordIDList();

        if ($ids) {
            $class = $this->gridField->list->dataClass;

            return DataList::create($class)->byIDs($ids);
        } else {
            return false;
        }
    }
public function getRecords ( ) { $ ids = $ this -> getRecordIDList ( ) ; if ( $ ids ) { $ class = $ this -> gridField -> list -> dataClass ; return DataList :: create ( $ class ) -> byIDs ( $ ids ) ; } else { return false ; } }
Returns a DataList of the records selected in the front-end.

@return DataList List of records
Returns a DataList of the records selected in the front - end .