1 | <?php |
||
17 | class BaseTheme extends ThemeAbstract |
||
18 | { |
||
19 | /** |
||
20 | * Base view name. |
||
21 | * |
||
22 | * @var string |
||
23 | */ |
||
24 | public $viewAlias = '@yiicod/yii2-fileupload/themes/base/views/base'; |
||
25 | |||
26 | /** |
||
27 | * Button text. |
||
28 | * |
||
29 | * @var string |
||
30 | */ |
||
31 | public $buttonText = 'Find & Upload'; |
||
32 | |||
33 | // /** |
||
34 | // * Button text on drag&drop. |
||
35 | // * |
||
36 | // * @var string |
||
37 | // */ |
||
38 | // public $dropFilesText = 'Drop Files Here'; |
||
39 | |||
40 | /** |
||
41 | * Multiple file upload |
||
42 | * |
||
43 | * @var bool |
||
44 | */ |
||
45 | public $multiple = false; |
||
46 | |||
47 | /** |
||
48 | * Accept type |
||
49 | * |
||
50 | * @var string |
||
51 | */ |
||
52 | public $allowedAccept = 'video/*,image/*'; |
||
53 | |||
54 | /** |
||
55 | * jQuery file upload options (client side). |
||
56 | * |
||
57 | * @var array |
||
58 | */ |
||
59 | public $uploaderClientOptions = []; |
||
60 | |||
61 | /** |
||
62 | * Theme options |
||
63 | * |
||
64 | * @var array |
||
65 | */ |
||
66 | public $themeClientOptions = []; |
||
67 | |||
68 | /** |
||
69 | * Get theme view name |
||
70 | * |
||
71 | * @return string |
||
72 | */ |
||
73 | public function getViewAlias(): string |
||
77 | |||
78 | /** |
||
79 | * Get theme view data |
||
80 | * |
||
81 | * @return array |
||
82 | */ |
||
83 | public function getViewData(): array |
||
95 | |||
96 | /** |
||
97 | * Register theme client scripts |
||
98 | */ |
||
99 | public function registerClientScripts() |
||
103 | |||
104 | /** |
||
105 | * @return array |
||
106 | */ |
||
107 | protected function getUploaderClientOptions(): array |
||
138 | |||
139 | /** |
||
140 | * Get wrapper client options |
||
141 | * |
||
142 | * @return array |
||
143 | */ |
||
144 | protected function getThemeClientOptions(): array |
||
154 | } |
||
155 |