magnetico-web/src/Repository/UserRepository.php

20 lines
462 B
PHP
Raw Normal View History

<?php
namespace App\Repository;
use App\Entity\User;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Symfony\Bridge\Doctrine\RegistryInterface;
class UserRepository extends ServiceEntityRepository
{
public function __construct(RegistryInterface $registry)
{
parent::__construct($registry, User::class);
}
public function add(User $user): void
{
$this->getEntityManager()->persist($user);
}
}