1 <?php
2
3 4 5
6 class rex_effect_mediapath extends rex_effect_abstract
7 {
8 public function __construct()
9 {
10 }
11
12 public function execute()
13 {
14 if ($this->params['mediapath'] != '') {
15 $media_path = rex_path::frontend($this->params['mediapath'] . '/' . rex_media_manager::getMediaFile());
16 $this->media->setMediaPath($media_path);
17 }
18 }
19
20 public function getName()
21 {
22 return rex_i18n::msg('media_manager_effect_mediapath');
23 }
24
25 public function getParams()
26 {
27 return [
28 [
29 'label' => rex_i18n::msg('media_manager_effect_mediapath_path'),
30 'name' => 'mediapath',
31 'type' => 'string',
32 ],
33 ];
34 }
35 }
36