So I have an objectRepository that contains the following code:
public function searchObjects($data, $page = 0, $max = NULL, $em, $baseUrl, $locale) { tr