* * @method DocumentCategory|null find($id, $lockMode = null, $lockVersion = null) * @method DocumentCategory|null findOneBy(array $criteria, array $orderBy = null) * @method DocumentCategory[] findAll() * @method DocumentCategory[] findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) */ class DocumentCategoryRepository extends ServiceEntityRepository { public function __construct(ManagerRegistry $registry) { parent::__construct($registry, DocumentCategory::class); } public function findDocumentCategory(int $id): ?DocumentCategory { return $this->createQueryBuilder('document_category') ->andWhere('document_category.id = :val') ->setParameter('val', $id) ->getQuery() ->getOneOrNullResult() ; } // /** // * @return DocumentCategory[] Returns an array of DocumentCategory objects // */ // public function findByExampleField($value): array // { // return $this->createQueryBuilder('u') // ->andWhere('u.exampleField = :val') // ->setParameter('val', $value) // ->orderBy('u.id', 'ASC') // ->setMaxResults(10) // ->getQuery() // ->getResult() // ; // } // public function findOneBySomeField($value): ?DocumentCategory // { // return $this->createQueryBuilder('u') // ->andWhere('u.exampleField = :val') // ->setParameter('val', $value) // ->getQuery() // ->getOneOrNullResult() // ; // } }