set V1
This commit is contained in:
@@ -44,7 +44,7 @@ class AdminController extends AbstractController
|
||||
$userConnect = $token?->getUser();
|
||||
return $this->render('admin/user.html.twig', [
|
||||
'profile' => $userConnect,
|
||||
'participants' => $participantRepository->findAll(),
|
||||
'participants' => $participantRepository->getAll(),
|
||||
'controller_name' => 'AdminController',
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace App\Repository;
|
||||
|
||||
use App\Entity\Participant;
|
||||
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
||||
use Doctrine\ORM\Tools\Pagination\Paginator;
|
||||
use Doctrine\Persistence\ManagerRegistry;
|
||||
use Symfony\Component\PasswordHasher\Hasher\UserPasswordHasherInterface;
|
||||
|
||||
@@ -33,6 +34,16 @@ class ParticipantRepository extends ServiceEntityRepository
|
||||
return $newProfile;
|
||||
}
|
||||
|
||||
public function getAll(): Paginator
|
||||
{
|
||||
$qb = $this->createQueryBuilder('p')
|
||||
->addSelect('s')
|
||||
->leftJoin('p.site', 's')
|
||||
->getQuery();
|
||||
return new Paginator($qb);
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * @return Participant[] Returns an array of Participant objects
|
||||
// */
|
||||
|
||||
Reference in New Issue
Block a user