public function getItems($offset = null, $count = null) { $this->_setPage($offset, $count); $groupedItems = array(); $getGroupKey = $this->_getGroupKey; foreach ($this->_paging->getItems() as $item) { $groupedItems[$getGroupKey($item)][] = $item; } return array_values($groupedItems); }