Get all filtered records by a List Widget
0
If you want to take an action on all currently filtered records from your Controller implementing the ListController behavior, add this method to your controller:
public function onGetFilteredRecords()
{
$this->makeLists();
$listWidget = $this->asExtension('ListController')->listGetWidget();
$query = $listWidget->prepareQuery();
$records = $query->get();
// do something with $records
}
There are no comments yet
Be the first one to comment