public function findAllBySalesman($idSalesman) { $orders = $this->ordersRepository->findBy(['user_id' => (int) $idSalesman]); $result = []; foreach ($orders as $order) { $result[] = $this->find($order->getId()); } return $this->ordersRepository->getPaginator(new ArrayAdapter($result)); }