1 | <?php |
||
5 | class File extends Element |
||
6 | { |
||
7 | protected $type = 'file'; |
||
8 | |||
9 | protected $actionUrl; |
||
10 | |||
11 | protected $multiple = false; |
||
12 | |||
13 | protected $showFileList = true; |
||
14 | |||
15 | protected $withCredentials = false; |
||
16 | |||
17 | protected $fileSizeLimit = 0; |
||
18 | |||
19 | protected $fileUploadsLimit = 0; |
||
20 | |||
21 | protected $fileExts; |
||
22 | |||
23 | public function getValue() |
||
37 | |||
38 | public function getActionUrl() |
||
57 | |||
58 | public function setActionUrl($value) |
||
64 | |||
65 | /** |
||
66 | * Allow multiple selection files |
||
67 | * |
||
68 | * @return $this |
||
69 | */ |
||
70 | public function isMultiple() |
||
76 | |||
77 | /** |
||
78 | * Show file list |
||
79 | * |
||
80 | * @return $this |
||
81 | */ |
||
82 | public function disableFileList() |
||
88 | |||
89 | /** |
||
90 | * Indicates whether or not cross-site Access-Control requests |
||
91 | * should be made using credentials |
||
92 | * |
||
93 | * @return $this |
||
94 | */ |
||
95 | public function withCredentials() |
||
101 | |||
102 | /** |
||
103 | * The maximum size allowed for a file upload. (KB) |
||
104 | * |
||
105 | * @param int $value |
||
106 | * |
||
107 | * @return $this |
||
108 | */ |
||
109 | public function setFileSizeLimit($value) |
||
114 | |||
115 | public function getFileExts() |
||
123 | |||
124 | /** |
||
125 | * A list of allowable extensions that can be uploaded. |
||
126 | * |
||
127 | * @param array|string $value |
||
128 | * |
||
129 | * @return $this |
||
130 | */ |
||
131 | public function setFileExts($value) |
||
137 | |||
138 | /** |
||
139 | * The maximum number of files that can be uploaded. |
||
140 | * |
||
141 | * @param int $value |
||
142 | * |
||
143 | * @return $this |
||
144 | */ |
||
145 | public function setFileUploadsLimit($value) |
||
151 | |||
152 | public function toArray() |
||
163 | } |
||
164 |