|
|
@ -3,6 +3,7 @@ |
|
|
|
namespace App\Repository; |
|
|
|
|
|
|
|
use App\Entity\Project; |
|
|
|
use App\Entity\Task; |
|
|
|
use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; |
|
|
|
use Doctrine\Persistence\ManagerRegistry; |
|
|
|
|
|
|
@ -16,20 +17,17 @@ class ProjectRepository extends ServiceEntityRepository |
|
|
|
parent::__construct($registry, Project::class); |
|
|
|
} |
|
|
|
|
|
|
|
// /**
|
|
|
|
// * @return Project[] Returns an array of Project objects
|
|
|
|
// */
|
|
|
|
// public function findByExampleField($value): array
|
|
|
|
// {
|
|
|
|
// return $this->createQueryBuilder('p')
|
|
|
|
// ->andWhere('p.exampleField = :val')
|
|
|
|
// ->setParameter('val', $value)
|
|
|
|
// ->orderBy('p.id', 'ASC')
|
|
|
|
// ->setMaxResults(10)
|
|
|
|
// ->getQuery()
|
|
|
|
// ->getResult()
|
|
|
|
// ;
|
|
|
|
// }
|
|
|
|
/** |
|
|
|
* @return Project[] Returns an array of Project objects |
|
|
|
*/ |
|
|
|
public function findAllOrderedByActivity(): array |
|
|
|
{ |
|
|
|
return $this->createQueryBuilder('p') |
|
|
|
->orderBy('p.createdAt', 'DESC') |
|
|
|
->getQuery() |
|
|
|
->getResult() |
|
|
|
; |
|
|
|
} |
|
|
|
|
|
|
|
// public function findOneBySomeField($value): ?Project
|
|
|
|
// {
|
|
|
|