SubscriptionEventRepository, SubscriptionRepository, UserRepository now have add() method which will add entity to the EntityManager.
This commit is contained in:
parent
b229a3a8b8
commit
ba574984d7
|
@ -9,6 +9,11 @@ use Skobkin\Bundle\PointToolsBundle\Entity\User;
|
||||||
|
|
||||||
class SubscriptionEventRepository extends EntityRepository
|
class SubscriptionEventRepository extends EntityRepository
|
||||||
{
|
{
|
||||||
|
public function add(SubscriptionEvent $entity)
|
||||||
|
{
|
||||||
|
$this->getEntityManager()->persist($entity);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -3,10 +3,16 @@
|
||||||
namespace Skobkin\Bundle\PointToolsBundle\Repository;
|
namespace Skobkin\Bundle\PointToolsBundle\Repository;
|
||||||
|
|
||||||
use Doctrine\ORM\EntityRepository;
|
use Doctrine\ORM\EntityRepository;
|
||||||
|
use Skobkin\Bundle\PointToolsBundle\Entity\Subscription;
|
||||||
use Skobkin\Bundle\PointToolsBundle\Entity\User;
|
use Skobkin\Bundle\PointToolsBundle\Entity\User;
|
||||||
|
|
||||||
class SubscriptionRepository extends EntityRepository
|
class SubscriptionRepository extends EntityRepository
|
||||||
{
|
{
|
||||||
|
public function add(Subscription $entity)
|
||||||
|
{
|
||||||
|
$this->getEntityManager()->persist($entity);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param int $id
|
* @param int $id
|
||||||
*
|
*
|
||||||
|
|
|
@ -8,6 +8,11 @@ use Skobkin\Bundle\PointToolsBundle\Entity\User;
|
||||||
|
|
||||||
class UserRepository extends EntityRepository
|
class UserRepository extends EntityRepository
|
||||||
{
|
{
|
||||||
|
public function add(User $entity)
|
||||||
|
{
|
||||||
|
$this->getEntityManager()->persist($entity);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Case-insensitive user search
|
* Case-insensitive user search
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in a new issue