Skip to content
Snippets Groups Projects
Commit d90b1781 authored by Fabrice Gangler's avatar Fabrice Gangler :art:
Browse files

feat(software): allow data persistence

parent b57f9724
No related branches found
No related tags found
No related merge requests found
...@@ -16,6 +16,17 @@ public function __construct(ManagerRegistry $registry) ...@@ -16,6 +16,17 @@ public function __construct(ManagerRegistry $registry)
parent::__construct($registry, Software::class); parent::__construct($registry, Software::class);
} }
public function save(Software $entity, bool $flush = false): void
{
$this->getEntityManager()->persist($entity);
if ($flush) {
$this->getEntityManager()->flush();
}
}
// /** // /**
// * @return Software[] Returns an array of Software objects // * @return Software[] Returns an array of Software objects
// */ // */
...@@ -40,4 +51,5 @@ public function __construct(ManagerRegistry $registry) ...@@ -40,4 +51,5 @@ public function __construct(ManagerRegistry $registry)
// ->getOneOrNullResult() // ->getOneOrNullResult()
// ; // ;
// } // }
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment