magnetico-web/src/Repository/UserRepository.php

20 lines
455 B
PHP
Raw Normal View History

<?php
namespace App\Repository;
use App\Entity\User;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
2020-01-17 22:41:35 +00:00
use Doctrine\Persistence\ManagerRegistry;
class UserRepository extends ServiceEntityRepository
{
2020-01-17 22:41:35 +00:00
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, User::class);
}
public function add(User $user): void
{
$this->getEntityManager()->persist($user);
}
}