configurable csv/xlsx export templates (#5531)
This commit is contained in:
31
src/Repository/ExportTemplateRepository.php
Normal file
31
src/Repository/ExportTemplateRepository.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of the Kimai time-tracking app.
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\ExportTemplate;
|
||||
use Doctrine\ORM\EntityRepository;
|
||||
|
||||
/**
|
||||
* @extends \Doctrine\ORM\EntityRepository<ExportTemplate>
|
||||
*/
|
||||
class ExportTemplateRepository extends EntityRepository
|
||||
{
|
||||
public function saveExportTemplate(ExportTemplate $template): void
|
||||
{
|
||||
$this->getEntityManager()->persist($template);
|
||||
$this->getEntityManager()->flush();
|
||||
}
|
||||
|
||||
public function removeExportTemplate(ExportTemplate $template): void
|
||||
{
|
||||
$this->getEntityManager()->remove($template);
|
||||
$this->getEntityManager()->flush();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user