upd: MemberDocumentRepository
Remove * remove unsigned documents from repository for member to sign
This commit is contained in:
parent
6468e77445
commit
0844b3fc58
@ -4,7 +4,6 @@ namespace App\Repository;
|
|||||||
|
|
||||||
use App\Entity\MemberDocument;
|
use App\Entity\MemberDocument;
|
||||||
use App\Entity\Member;
|
use App\Entity\Member;
|
||||||
use App\Entity\MemberCase;
|
|
||||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||||
use Doctrine\Persistence\ManagerRegistry;
|
use Doctrine\Persistence\ManagerRegistry;
|
||||||
|
|
||||||
@ -18,6 +17,18 @@ class MemberDocumentRepository extends ServiceEntityRepository
|
|||||||
parent::__construct($registry, MemberDocument::class);
|
parent::__construct($registry, MemberDocument::class);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function removeUnsigned(Member $member)
|
||||||
|
{
|
||||||
|
$conn = $this->getEntityManager()->getConnection();
|
||||||
|
$sql = "DELETE FROM member_document WHERE client_id = :client_id AND client_signed IS NULL";
|
||||||
|
$stmt = $conn->prepare($sql);
|
||||||
|
$result = $stmt->executeQuery([
|
||||||
|
'client_id' => $member->getId()->toBinary()
|
||||||
|
]);
|
||||||
|
|
||||||
|
return $result;
|
||||||
|
}
|
||||||
|
|
||||||
// /**
|
// /**
|
||||||
// * @return CaseDocument[] Returns an array of CaseDocument objects
|
// * @return CaseDocument[] Returns an array of CaseDocument objects
|
||||||
// */
|
// */
|
||||||
|
Loading…
Reference in New Issue
Block a user