Implement recipes
This commit is contained in:
		
							
								
								
									
										50
									
								
								src/Repository/RecipeRepository.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										50
									
								
								src/Repository/RecipeRepository.php
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,50 @@ | ||||
| <?php | ||||
|  | ||||
| namespace App\Repository; | ||||
|  | ||||
| use App\Entity\Recipe; | ||||
| use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; | ||||
| use Doctrine\Persistence\ManagerRegistry; | ||||
|  | ||||
| /** | ||||
|  * @method Recipe|null find($id, $lockMode = null, $lockVersion = null) | ||||
|  * @method Recipe|null findOneBy(array $criteria, array $orderBy = null) | ||||
|  * @method Recipe[]    findAll() | ||||
|  * @method Recipe[]    findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) | ||||
|  */ | ||||
| class RecipeRepository extends ServiceEntityRepository | ||||
| { | ||||
|     public function __construct(ManagerRegistry $registry) | ||||
|     { | ||||
|         parent::__construct($registry, Recipe::class); | ||||
|     } | ||||
|  | ||||
|     // /** | ||||
|     //  * @return Recipe[] Returns an array of Recipe objects | ||||
|     //  */ | ||||
|     /* | ||||
|     public function findByExampleField($value) | ||||
|     { | ||||
|         return $this->createQueryBuilder('r') | ||||
|             ->andWhere('r.exampleField = :val') | ||||
|             ->setParameter('val', $value) | ||||
|             ->orderBy('r.id', 'ASC') | ||||
|             ->setMaxResults(10) | ||||
|             ->getQuery() | ||||
|             ->getResult() | ||||
|         ; | ||||
|     } | ||||
|     */ | ||||
|  | ||||
|     /* | ||||
|     public function findOneBySomeField($value): ?Recipe | ||||
|     { | ||||
|         return $this->createQueryBuilder('r') | ||||
|             ->andWhere('r.exampleField = :val') | ||||
|             ->setParameter('val', $value) | ||||
|             ->getQuery() | ||||
|             ->getOneOrNullResult() | ||||
|         ; | ||||
|     } | ||||
|     */ | ||||
| } | ||||
		Reference in New Issue
	
	Block a user