Explorar el Código

Merge branch 'develop'

feature/symfony6.1
Fabien Normand hace 1 año
padre
commit
d52bdce047
Se han modificado 1 ficheros con 6 adiciones y 1 borrados
  1. +6
    -1
      Repository/AbstractRepositoryQuery.php

+ 6
- 1
Repository/AbstractRepositoryQuery.php Ver fichero

@@ -131,7 +131,6 @@ abstract class AbstractRepositoryQuery implements RepositoryQueryInterface
return $this;
}*/

// @TODO : créer un addOrderBy et un orderBy
public function orderBy(string $field, string $sort = 'ASC'): self
{
if (strpos($field, '.')!==false) {
@@ -141,6 +140,12 @@ abstract class AbstractRepositoryQuery implements RepositoryQueryInterface
}
}

public function setOrderBy(string $field, string $sort = 'ASC'): self
{
$this->resetDQLParts(['orderBy']);
return $this->orderBy($field, $sort);
}

public function filterById(int $id):self
{
return $this

Cargando…
Cancelar
Guardar