1 | <?php |
||
25 | class MediaManager implements MediaManagerInterface |
||
26 | { |
||
27 | /** |
||
28 | * @var MediaFactoryInterface |
||
29 | */ |
||
30 | protected $mediaFactory; |
||
31 | |||
32 | /** |
||
33 | * @var Filesystem |
||
34 | */ |
||
35 | protected $filesystem; |
||
36 | |||
37 | /** |
||
38 | * @var RouterInterface |
||
39 | */ |
||
40 | protected $router; |
||
41 | |||
42 | /** |
||
43 | * @var ArticleMediaRepositoryInterface |
||
44 | */ |
||
45 | protected $mediaRepository; |
||
46 | |||
47 | /** |
||
48 | * MediaManager constructor. |
||
49 | * |
||
50 | * @param ArticleMediaRepositoryInterface $mediaRepository |
||
51 | * @param MediaFactoryInterface $mediaFactory |
||
52 | * @param Filesystem $filesystem |
||
53 | * @param RouterInterface $router |
||
54 | */ |
||
55 | 8 | public function __construct( |
|
66 | |||
67 | /** |
||
68 | * {@inheritdoc} |
||
69 | */ |
||
70 | public function handleUploadedFile(UploadedFile $uploadedFile, $mediaId) |
||
80 | |||
81 | /** |
||
82 | * {@inheritdoc} |
||
83 | */ |
||
84 | public function getFile(FileInterface $media) |
||
88 | |||
89 | /** |
||
90 | * {@inheritdoc} |
||
91 | */ |
||
92 | public function saveFile(UploadedFile $uploadedFile, $fileName) |
||
100 | |||
101 | /** |
||
102 | * {@inheritdoc} |
||
103 | */ |
||
104 | public function getMediaPublicUrl(FileInterface $media) |
||
108 | |||
109 | /** |
||
110 | * {@inheritdoc} |
||
111 | */ |
||
112 | public function getMediaUri(FileInterface $media, $type = RouterInterface::ABSOLUTE_PATH) |
||
119 | |||
120 | protected function getMediaBasePath(): string |
||
126 | } |
||
127 |