The multiple collections return the sum of the collections. The best thing to do is to get all the items then filter out the ones you don’t want as you iterate over them.
For anyone trying to do this, I had to do it like so:
private function getItems($page) {
$page->collection($params, $pagination)->filter(array($this, 'filter');
}
public function filter($value, $key) {
// If key is not in target page collection, filter it from results.
$children = $this->target->children();
if ($children->offsetGet($key)) {
return true;
} else {
return false;
}
}
---
Was it not achievable without custom PHP functions? Also, surely it would be more efficient to allow for the addition of partial collections to a larger one, rather than filtering out content from multiple large ones.