1 | <?php |
||
17 | class EntityParamConverter implements ParamConverterInterface |
||
18 | { |
||
19 | |||
20 | /** |
||
21 | * @var EntityTypeManagerInterface |
||
22 | */ |
||
23 | private $entityTypeManager; |
||
24 | |||
25 | /** |
||
26 | * @param EntityTypeManagerInterface $entityTypeManager |
||
27 | */ |
||
28 | 13 | public function __construct(EntityTypeManagerInterface $entityTypeManager) |
|
32 | |||
33 | /** |
||
34 | * @param Request $request |
||
35 | * @param ParamConverter $configuration |
||
36 | * |
||
37 | * @return bool |
||
38 | */ |
||
39 | 5 | public function apply(Request $request, ParamConverter $configuration) |
|
53 | |||
54 | /** |
||
55 | * @param string $value |
||
56 | * @param ParamConverter $configuration |
||
57 | * |
||
58 | * @return EntityInterface|null |
||
59 | */ |
||
60 | 4 | protected function getNode($value, ParamConverter $configuration) |
|
67 | |||
68 | /** |
||
69 | * @param ParamConverter $configuration |
||
70 | * @param EntityInterface $node |
||
71 | */ |
||
72 | 4 | protected function assertValidNode( |
|
90 | |||
91 | /** |
||
92 | * @param ParamConverter $configuration |
||
93 | * |
||
94 | * @return bool |
||
95 | */ |
||
96 | 7 | public function supports(ParamConverter $configuration) |
|
110 | } |
||
111 |