Add event budget element entity, forms and event property

This commit is contained in:
2025-05-06 14:03:25 +02:00
parent 9baf15221f
commit b024eef493
10 changed files with 322 additions and 6 deletions

View File

@@ -0,0 +1,46 @@
<?php
declare(strict_types=1);
/*
* Chill is a software for social workers
*
* For the full copyright and license information, please view
* the LICENSE file that was distributed with this source code.
*/
namespace Chill\EventBundle\Repository;
use Chill\EventBundle\Entity\EventBudgetKind;
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
use Doctrine\Persistence\ManagerRegistry;
/**
* @extends ServiceEntityRepository<EventBudgetKind>
*/
class EventBudgetKindRepository extends ServiceEntityRepository
{
public function __construct(ManagerRegistry $registry)
{
parent::__construct($registry, EventBudgetKind::class);
}
public function findByActive(): array
{
return $this->createQueryBuilder('e')
->select('e')
->where('e.active = True')
->getQuery()
->getResult();
}
public function findByType(string $type): array
{
return $this->createQueryBuilder('e')
->select('e')
->where('e.type = :type')
->setParameter('type', $type)
->getQuery()
->getResult();
}
}