mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX: Fix PaginatedList::toArray()
It wasn’t respecting pagination.
This commit is contained in:
parent
6c136c9cf2
commit
1efe2b46ff
@ -225,6 +225,21 @@ class PaginatedList extends ListDecorator
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @return array
|
||||||
|
*/
|
||||||
|
public function toArray()
|
||||||
|
{
|
||||||
|
$result = [];
|
||||||
|
|
||||||
|
// Use getIterator()
|
||||||
|
foreach($this as $record) {
|
||||||
|
$result[] = $record;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a set of links to all the pages in the list. This is useful for
|
* Returns a set of links to all the pages in the list. This is useful for
|
||||||
* basic pagination.
|
* basic pagination.
|
||||||
|
Loading…
Reference in New Issue
Block a user