◆ create()
static create |
( |
|
$data, |
|
|
|
$user_id = null |
|
) |
| |
|
static |
- Parameters
-
array | $data | : ['name' => "myfile", 'access_type': "redirect|proxy", 'url': ""] |
string | null | $user_id | : user-id of the user who should be owner of that file |
- Returns
- array|FileType : the new File, which is already stored but not attached to a folder.
◆ getActionmenu()
◆ getDownloadURL()
Returns the URL to download the file. May be sendfile.php?... or an external link.
- Returns
- string|null
Implements FileType.
◆ getFilename()
Filename of the FileType-object.
- Returns
- mixed
Implements FileType.
◆ getIcon()
Returns the name of the icon shape that shall be used with the FileType implementation.
- Parameters
-
- Returns
- Icon icon for the FileType implementation.
Implements FileType.
◆ getInfoDialogButtons()
getInfoDialogButtons |
( |
array |
$extra_link_params = [] | ) |
|
Returns a list of Stud.IP button objects that represent actions that shall be visible for the file type in the info dialog.
- Parameters
-
array | $extra_link_params | An optional array of URL parameters that should be added to Button URLs, if reasonable. The parameter names are the keys of the array while their values are also the array item values. |
- Returns
- Interactable[] A list of Stud.IP buttons (LinkButton or Button).
Implements FileType.
◆ getInfoTemplate()
getInfoTemplate |
( |
bool |
$include_downloadable_infos = false | ) |
|
Generates a Flexi containing additional information that are displayes in the information dialog of a file.
- Parameters
-
bool | $include_downloadable_infos | Whether to include information like file previews that can be downloaded (true) or to not include them (false). Defaults to false. |
- Returns
- Flexi|null Either a Flexi containing additional information or null if no such information shall be displayed in the information dialog.
Implements FileType.
◆ getMimeType()
Returns the mime-type of that FileType-object.
- Returns
- string
Implements FileType.
◆ getPath()
Returns the (real) file system path for the file. This is only relevant for FileType implementations storing real files on the server disk. Other implementations shall just return an empty string.
- Returns
- The file system path for the file or an empty string if the file doesn't have a path in the file system.
Implements FileType.
◆ getSize()
Returns the size of the file in bytes. If this is null, the file doesn't exist physically - is probably only a weblink or a request for libraries.
- Returns
- integer|null
Implements FileType.
The documentation for this class was generated from the following file: