1 | <?php |
||
18 | class ORMDataProvider implements DataProviderInterface |
||
19 | { |
||
20 | /** |
||
21 | * @var EntityManagerInterface |
||
22 | */ |
||
23 | private $entityManager; |
||
24 | |||
25 | /** |
||
26 | * @var EventDispatcherInterface |
||
27 | */ |
||
28 | private $eventDispatcher; |
||
29 | |||
30 | /** |
||
31 | * @var RequestStack |
||
32 | */ |
||
33 | private $requestStack; |
||
34 | |||
35 | /** |
||
36 | * DoctrineORMDataProvider constructor. |
||
37 | * |
||
38 | * @param EntityManagerInterface $entityManager |
||
39 | * @param EventDispatcherInterface $eventDispatcher |
||
40 | * @param RequestStack $requestStack |
||
41 | */ |
||
42 | public function __construct( |
||
51 | |||
52 | /** |
||
53 | * Load a collection of entities. |
||
54 | * |
||
55 | * @param AdminInterface $admin |
||
56 | * @param array $filters |
||
57 | * |
||
58 | * @return mixed |
||
59 | */ |
||
60 | public function getCollection(AdminInterface $admin, array $filters = []) |
||
91 | |||
92 | /** |
||
93 | * @inheritdoc |
||
94 | */ |
||
95 | public function get(AdminInterface $admin, string $identifier) |
||
113 | |||
114 | /** |
||
115 | * @inheritdoc |
||
116 | */ |
||
117 | public function save(AdminInterface $admin): void |
||
122 | |||
123 | /** |
||
124 | * @inheritdoc |
||
125 | */ |
||
126 | public function create(AdminInterface $admin) |
||
132 | |||
133 | /** |
||
134 | * @inheritdoc |
||
135 | */ |
||
136 | public function delete(AdminInterface $admin): void |
||
144 | |||
145 | /** |
||
146 | * @param string $entityClass |
||
147 | * |
||
148 | * @return ObjectRepository|EntityRepository |
||
149 | */ |
||
150 | private function getRepository(string $entityClass) |
||
154 | } |
||
155 |