Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 3
CRAP
0.00% covered (danger)
0.00%
0 / 1
PagesRepository
0.00% covered (danger)
0.00%
0 / 7
0.00% covered (danger)
0.00%
0 / 3
30
0.00% covered (danger)
0.00%
0 / 1
 __construct
0.00% covered (danger)
0.00%
0 / 1
0.00% covered (danger)
0.00%
0 / 1
2
 add
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
 remove
0.00% covered (danger)
0.00%
0 / 3
0.00% covered (danger)
0.00%
0 / 1
6
1<?php
2
3namespace App\Repository;
4
5use App\Entity\Pages;
6use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository;
7use Doctrine\Persistence\ManagerRegistry;
8
9/**
10 * @extends ServiceEntityRepository<Pages>
11 *
12 * @method Pages|null find($id, $lockMode = null, $lockVersion = null)
13 * @method Pages|null findOneBy(array $criteria, array $orderBy = null)
14 * @method Pages[]    findAll()
15 * @method Pages[]    findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null)
16 */
17class PagesRepository extends ServiceEntityRepository
18{
19    public function __construct(ManagerRegistry $registry)
20    {
21        parent::__construct(registry: $registry, entityClass: Pages::class);
22    }
23
24    public function add(Pages $entity, bool $flush = true): void
25    {
26        $this->_em->persist(entity: $entity);
27        if ($flush) {
28            $this->_em->flush();
29        }
30    }
31
32    public function remove(Pages $entity, bool $flush = true): void
33    {
34        $this->_em->remove(entity: $entity);
35        if ($flush) {
36            $this->_em->flush();
37        }
38    }
39
40    // /**
41    //  * @return Pages[] Returns an array of Pages objects
42    //  */
43    /*
44    public function findByExampleField($value)
45    {
46        return $this->createQueryBuilder('p')
47            ->andWhere('p.exampleField = :val')
48            ->setParameter('val', $value)
49            ->orderBy('p.id', 'ASC')
50            ->setMaxResults(10)
51            ->getQuery()
52            ->getResult()
53        ;
54    }
55    */
56
57    /*
58    public function findOneBySomeField($value): ?Pages
59    {
60        return $this->createQueryBuilder('p')
61            ->andWhere('p.exampleField = :val')
62            ->setParameter('val', $value)
63            ->getQuery()
64            ->getOneOrNullResult()
65        ;
66    }
67    */
68}