1 | <?php |
||
12 | abstract class AbstractRepository extends EntityRepository |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * @return object|null Entity |
||
17 | */ |
||
18 | public function findOneByFormData(AbstractFormType $formType) |
||
22 | |||
23 | /** |
||
24 | * @return \Doctrine\ORM\EntityManager |
||
25 | */ |
||
26 | 2 | public function getEntityManager() |
|
30 | |||
31 | 14 | public function flush($entity = null) |
|
35 | |||
36 | /** |
||
37 | * @param object $entity |
||
38 | */ |
||
39 | 7 | public function persist($entity) |
|
43 | |||
44 | /** |
||
45 | * @param object $entity |
||
46 | */ |
||
47 | 1 | public function remove($entity) |
|
51 | |||
52 | /** |
||
53 | * @param int|string|array $id |
||
54 | * @return object|null Entity |
||
55 | */ |
||
56 | 22 | public function findOneById($id) |
|
60 | |||
61 | /** |
||
62 | * @param int $limit |
||
63 | * @param int $offset |
||
64 | * @return object[] Entity array |
||
65 | */ |
||
66 | 4 | public function findAllWithLimitAndOffset(int $limit = null, int $offset = null): array |
|
79 | |||
80 | 4 | public function countAll(): int |
|
88 | |||
89 | 4 | private function getEntityIdField(): string |
|
96 | } |
||
97 |