Conditions | 2 |
Paths | 2 |
Total Lines | 9 |
Code Lines | 4 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
32 | public function renderMedia(string $code, ?string $template = null): string |
||
33 | { |
||
34 | $media = $this->mediaResourceResolver->findOrLog($code); |
||
35 | |||
36 | if (null !== $media) { |
||
37 | return $this->mediaProviderResolver->resolveProvider($media)->render($media, $template); |
||
38 | } |
||
39 | |||
40 | return ''; |
||
41 | } |
||
43 |