mirror of
https://github.com/symfony/recipes-contrib.git
synced 2026-09-12 15:46:52 +03:00
Add maps_red/ticketing-bundle recipe
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
|
||||
namespace App\Repository;
|
||||
|
||||
use App\Entity\Ticket;
|
||||
use Symfony\Bridge\Doctrine\RegistryInterface;
|
||||
use Maps_red\TicketingBundle\Repository\TicketRepository as BaseTicketRepository;
|
||||
|
||||
/**
|
||||
* @method Ticket|null find($id, $lockMode = null, $lockVersion = null)
|
||||
* @method Ticket|null findOneBy(array $criteria, array $orderBy = null)
|
||||
* @method Ticket[] findAll()
|
||||
* @method Ticket[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
|
||||
*/
|
||||
class TicketRepository extends BaseTicketRepository
|
||||
{
|
||||
public function __construct(RegistryInterface $registry)
|
||||
{
|
||||
parent::__construct($registry, Ticket::class);
|
||||
}
|
||||
|
||||
// /**
|
||||
// * @return Ticket[] Returns an array of Ticket objects
|
||||
// */
|
||||
/*
|
||||
public function findByExampleField($value)
|
||||
{
|
||||
return $this->createQueryBuilder('t')
|
||||
->andWhere('t.exampleField = :val')
|
||||
->setParameter('val', $value)
|
||||
->orderBy('t.id', 'ASC')
|
||||
->setMaxResults(10)
|
||||
->getQuery()
|
||||
->getResult()
|
||||
;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
public function findOneBySomeField($value): ?Ticket
|
||||
{
|
||||
return $this->createQueryBuilder('t')
|
||||
->andWhere('t.exampleField = :val')
|
||||
->setParameter('val', $value)
|
||||
->getQuery()
|
||||
->getOneOrNullResult()
|
||||
;
|
||||
}
|
||||
*/
|
||||
}
|
||||
Reference in New Issue
Block a user