All checks were successful
Cadoles/nineskeletor/pipeline/head This commit looks good
34 lines
796 B
PHP
34 lines
796 B
PHP
<?php
|
|
|
|
namespace App\Repository;
|
|
|
|
use App\Entity\Niveau04;
|
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
|
|
use Doctrine\Persistence\ManagerRegistry;
|
|
|
|
class Niveau04Repository extends ServiceEntityRepository
|
|
{
|
|
public function __construct(ManagerRegistry $registry)
|
|
{
|
|
parent::__construct($registry, Niveau04::class);
|
|
}
|
|
|
|
public function add(Niveau04 $entity, bool $flush = false): void
|
|
{
|
|
$this->getEntityManager()->persist($entity);
|
|
|
|
if ($flush) {
|
|
$this->getEntityManager()->flush();
|
|
}
|
|
}
|
|
|
|
public function remove(Niveau04 $entity, bool $flush = false): void
|
|
{
|
|
$this->getEntityManager()->remove($entity);
|
|
|
|
if ($flush) {
|
|
$this->getEntityManager()->flush();
|
|
}
|
|
}
|
|
}
|