コード例 #1
0
 private function findPreviousOrdersToday() : Collection
 {
     $today = Carbon::now()->startOfDay();
     $criteria = new Criteria();
     $criteria->where($criteria->expr()->gte('updatedAt', $today));
     $criteria->andWhere($criteria->expr()->eq('confirmed', true));
     return $this->orderRepository->matching($criteria);
 }
コード例 #2
0
 /**
  * {@inheritdoc}
  */
 public function findOrder()
 {
     $id = $this->getRequestHelper()->getSessionAttribute('orderId');
     $order = $this->orderRepository->find($id);
     if (null === $order) {
         throw new OrderNotFoundException($id);
     }
     return $order;
 }