1 | <?php |
||
12 | class TransactionalDoctrineCrudService extends DoctrineCrudService |
||
13 | { |
||
14 | /** |
||
15 | * @var TransactionManager |
||
16 | */ |
||
17 | private $transactionManager; |
||
|
|||
18 | |||
19 | public function __construct(EntityManager $em, $class, TransactionManager $transactionManager = null) |
||
28 | |||
29 | /** |
||
30 | * {@inheritdoc} |
||
31 | */ |
||
32 | public function findAllPaginated(int $page = 1, int $perPage = 50): Paginator |
||
40 | |||
41 | /** |
||
42 | * {@inheritdoc} |
||
43 | */ |
||
44 | public function create($entity, bool $flush = true) |
||
52 | |||
53 | /** |
||
54 | * {@inheritdoc} |
||
55 | */ |
||
56 | public function update($entity, bool $flush = false) |
||
64 | |||
65 | /** |
||
66 | * {@inheritdoc} |
||
67 | */ |
||
68 | public function remove($entity, bool $flush = false) |
||
76 | |||
77 | /** |
||
78 | * {@inheritdoc} |
||
79 | */ |
||
80 | public function findAssociationPaginated($entity, string $fieldName, int $page = 1, $perPage = 50) |
||
93 | |||
94 | /** |
||
95 | * {@inheritdoc} |
||
96 | */ |
||
97 | public function createAssociation($entity, string $fieldName) |
||
105 | |||
106 | /** |
||
107 | * {@inheritdoc} |
||
108 | */ |
||
109 | public function addAssociation($entity, string $fieldName, $id) |
||
118 | |||
119 | /** |
||
120 | * {@inheritdoc} |
||
121 | */ |
||
122 | public function removeAssociation($entity, string $fieldName, $id = null) |
||
130 | |||
131 | /** |
||
132 | * {@inheritdoc} |
||
133 | */ |
||
134 | public function find($id, $lockMode = null, $lockVersion = null) |
||
142 | |||
143 | /** |
||
144 | * {@inheritdoc} |
||
145 | */ |
||
146 | public function findAll() |
||
154 | |||
155 | /** |
||
156 | * {@inheritdoc} |
||
157 | */ |
||
158 | public function findBy(array $criteria, array $orderBy = null, $limit = null, $offset = null) |
||
166 | |||
167 | /** |
||
168 | * {@inheritdoc} |
||
169 | */ |
||
170 | |||
171 | public function findOneBy(array $criteria, array $orderBy = null) |
||
179 | } |
||
180 |