Allow ceating and editing snips
This commit is contained in:
@ -21,7 +21,7 @@ class SnipRepository extends ServiceEntityRepository
|
||||
parent::__construct($registry, Snip::class);
|
||||
}
|
||||
|
||||
public function save(Snip $entity, bool $flush = false): void
|
||||
public function save(Snip $entity, bool $flush = true): void
|
||||
{
|
||||
$this->getEntityManager()->persist($entity);
|
||||
|
||||
@ -30,7 +30,7 @@ class SnipRepository extends ServiceEntityRepository
|
||||
}
|
||||
}
|
||||
|
||||
public function remove(Snip $entity, bool $flush = false): void
|
||||
public function remove(Snip $entity, bool $flush = true): void
|
||||
{
|
||||
$this->getEntityManager()->remove($entity);
|
||||
|
||||
@ -38,29 +38,4 @@ class SnipRepository extends ServiceEntityRepository
|
||||
$this->getEntityManager()->flush();
|
||||
}
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Snip[] Returns an array of Snip objects
|
||||
// */
|
||||
// public function findByExampleField($value): array
|
||||
// {
|
||||
// return $this->createQueryBuilder('s')
|
||||
// ->andWhere('s.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->orderBy('s.id', 'ASC')
|
||||
// ->setMaxResults(10)
|
||||
// ->getQuery()
|
||||
// ->getResult()
|
||||
// ;
|
||||
// }
|
||||
|
||||
// public function findOneBySomeField($value): ?Snip
|
||||
// {
|
||||
// return $this->createQueryBuilder('s')
|
||||
// ->andWhere('s.exampleField = :val')
|
||||
// ->setParameter('val', $value)
|
||||
// ->getQuery()
|
||||
// ->getOneOrNullResult()
|
||||
// ;
|
||||
// }
|
||||
}
|
||||
|
Reference in New Issue
Block a user