first commit symfony 6

This commit is contained in:
2022-07-21 16:15:47 +02:00
parent d9bfbb6b3c
commit 5c4961748b
282 changed files with 37482 additions and 0 deletions

View File

@ -0,0 +1,33 @@
<?php
namespace App\Repository;
use App\Entity\UserGroup;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
class UserGroupRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, UserGroup::class);
}
public function add(UserGroup $entity, bool $flush = false): void
{
$this->getEntityManager()->persist($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
public function remove(UserGroup $entity, bool $flush = false): void
{
$this->getEntityManager()->remove($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
}