SubscriptionEventRepository, SubscriptionRepository, UserRepository now have add() method which will add entity to the EntityManager.

This commit is contained in:
Alexey Skobkin 2017-01-11 04:10:32 +03:00
parent b229a3a8b8
commit ba574984d7
3 changed files with 16 additions and 0 deletions

View File

@ -9,6 +9,11 @@ use Skobkin\Bundle\PointToolsBundle\Entity\User;
class SubscriptionEventRepository extends EntityRepository
{
public function add(SubscriptionEvent $entity)
{
$this->getEntityManager()->persist($entity);
}
/**
* @return int
*/

View File

@ -3,10 +3,16 @@
namespace Skobkin\Bundle\PointToolsBundle\Repository;
use Doctrine\ORM\EntityRepository;
use Skobkin\Bundle\PointToolsBundle\Entity\Subscription;
use Skobkin\Bundle\PointToolsBundle\Entity\User;
class SubscriptionRepository extends EntityRepository
{
public function add(Subscription $entity)
{
$this->getEntityManager()->persist($entity);
}
/**
* @param int $id
*

View File

@ -8,6 +8,11 @@ use Skobkin\Bundle\PointToolsBundle\Entity\User;
class UserRepository extends EntityRepository
{
public function add(User $entity)
{
$this->getEntityManager()->persist($entity);
}
/**
* Case-insensitive user search
*