This commit is contained in:
@@ -24,6 +24,12 @@ class OrdersRepository extends ServiceEntityRepository
|
||||
parent::__construct($registry, Orders::class);
|
||||
$this->validator = $validator;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Orders $entity
|
||||
* @param bool $flush
|
||||
* @return void
|
||||
*/
|
||||
public function add(Orders $entity, bool $flush = false): void
|
||||
{
|
||||
|
||||
@@ -39,6 +45,11 @@ class OrdersRepository extends ServiceEntityRepository
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Orders $entity
|
||||
* @param bool $flush
|
||||
* @return void
|
||||
*/
|
||||
public function update(Orders $entity, bool $flush = false): void
|
||||
{
|
||||
$order = $this->getEntityManager()->find(Orders::class, $entity->getId());
|
||||
@@ -48,6 +59,11 @@ class OrdersRepository extends ServiceEntityRepository
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Orders $entity
|
||||
* @param bool $flush
|
||||
* @return void
|
||||
*/
|
||||
public function remove(Orders $entity, bool $flush = false): void
|
||||
{
|
||||
$this->getEntityManager()->remove($entity);
|
||||
@@ -72,11 +88,11 @@ class OrdersRepository extends ServiceEntityRepository
|
||||
;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $orderId
|
||||
* @return Orders|null
|
||||
* @throws \Doctrine\ORM\NonUniqueResultException
|
||||
*/
|
||||
/**
|
||||
* @param $orderId
|
||||
* @return Orders|null
|
||||
* @throws \Doctrine\ORM\NonUniqueResultException
|
||||
*/
|
||||
public function findOneByOrderId($orderId): ?Orders
|
||||
{
|
||||
return $this->createQueryBuilder('o')
|
||||
|
||||
Reference in New Issue
Block a user