Final updates for v2.0 #29
@@ -25,13 +25,13 @@ class ReferenceRepository extends ServiceEntityRepository
|
|||||||
->getResult();
|
->getResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
public function findHeidelberg($ref): array|Reference
|
public function findHeidelberg(string $ref): array|Reference
|
||||||
{
|
{
|
||||||
if (substr($ref, 0, 2) == 'ld') {
|
if (substr($ref, 0, 2) == 'ld') {
|
||||||
$num = substr($ref, 2);
|
$num = substr($ref, 2);
|
||||||
$qb = $this->createQueryBuilder('r');
|
$qb = $this->createQueryBuilder('r');
|
||||||
$r = $qb->where($qb->expr()->like('r.label', ':ld'))
|
$r = $qb->where($qb->expr()->like('r.label', ':ld'))
|
||||||
->setParameter('ld', "ld{$num}-%")
|
->setParameter('ld', "LD{$num}-%")
|
||||||
->getQuery()
|
->getQuery()
|
||||||
->getResult()
|
->getResult()
|
||||||
;
|
;
|
||||||
@@ -39,7 +39,7 @@ class ReferenceRepository extends ServiceEntityRepository
|
|||||||
$num = substr($ref, 2);
|
$num = substr($ref, 2);
|
||||||
$qb = $this->createQueryBuilder('r');
|
$qb = $this->createQueryBuilder('r');
|
||||||
$r = $qb->where($qb->expr()->like('r.label', ':hc'))
|
$r = $qb->where($qb->expr()->like('r.label', ':hc'))
|
||||||
->setParameter('hc', "%-hc{$num}")
|
->setParameter('hc', "%-HC{$num}")
|
||||||
->getQuery()
|
->getQuery()
|
||||||
->getResult()
|
->getResult()
|
||||||
;
|
;
|
||||||
|
|||||||
Reference in New Issue
Block a user