Example #1
0
 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));
 }