I want to get data from a table, loop through it and "unset" some entities before passing it to the view.
$shops = $table-find();
foreach ($shops as $shop) {
if (condition 1) {
unset($shop); //
}
}
In the end I want to have a clean query with reduced results.
I tried to loop through $shops with formatResults()
and map()
but I was only able to set the entities to null.