Stud.IP
6.0
|
Public Member Functions | |
getIcon ($role) | |
getId () | |
getFilename () | |
getUserId () | |
getUserName () | |
getAccessibility () | |
getUser () | |
getSize () | |
getDownloadURL () | |
getDownloads () | |
getPath () | |
getLastChangeDate () | |
getMakeDate () | |
getDescription () | |
getMimeType () | |
getTermsOfUse () | |
getActionmenu () | |
getInfoDialogButtons (array $extra_link_params=[]) | |
delete () | |
getFolderType () | |
isVisible ($user_id=null) | |
isDownloadable ($user_id=null) | |
isEditable ($user_id=null) | |
isWritable ($user_id=null) | |
convertToStandardFile () | |
getContentForAdditionalColumn ($column_index) | |
getAdditionalColumnOrderWeigh ($column_index) | |
getInfoTemplate (bool $include_downloadable_infos=false) | |
convertToStandardFile | ( | ) |
Returns an object of the class StandardFile or a derived class.
Implemented in StandardFile, and UnknownFileType.
delete | ( | ) |
getAccessibility | ( | ) |
Returns if a file is accessible or not.
Implemented in UnknownFileType, and StandardFile.
getActionmenu | ( | ) |
Returns an instance of ActionMenu.
Implemented in StandardFile, LibraryFile, UnknownFileType, and URLFile.
getAdditionalColumnOrderWeigh | ( | $column_index | ) |
Returns an integer that marks the value the content of the given column should be ordered by.
string | $column_index |
Implemented in StandardFile, and UnknownFileType.
getContentForAdditionalColumn | ( | $column_index | ) |
Returns the content for that additional column, if it exists. You can return null, a string or a Flexi as the content.
string | $column_index |
Implemented in StandardFile, and UnknownFileType.
getDescription | ( | ) |
Returns the description of that FileType object.
Implemented in StandardFile, and UnknownFileType.
getDownloads | ( | ) |
Returns the number of downloads this file already has. Returns null if information is not available.
Implemented in StandardFile, LibraryFile, and UnknownFileType.
getDownloadURL | ( | ) |
Returns the URL to download the file. May be sendfile.php?... or an external link.
Implemented in StandardFile, LibraryFile, UnknownFileType, and URLFile.
getFilename | ( | ) |
Filename of the FileType-object.
Implemented in StandardFile, LibraryFile, UnknownFileType, and URLFile.
getFolderType | ( | ) |
Returns the FolderTyp of the parent folder.
Implemented in StandardFile, and UnknownFileType.
getIcon | ( | $role | ) |
Returns the name of the icon shape that shall be used with the FileType implementation.
string | $role | role of icon |
Implemented in StandardFile, LibraryFile, UnknownFileType, and URLFile.
getId | ( | ) |
Returns the id of the file which is most likely the id of the FileRef object within the FileType object.
Implemented in StandardFile, and UnknownFileType.
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.
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. |
Implemented in StandardFile, LibraryFile, UnknownFileType, and URLFile.
getInfoTemplate | ( | bool | $include_downloadable_infos = false | ) |
Generates a Flexi containing additional information that are displayes in the information dialog of a file.
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. |
Implemented in StandardFile, LibraryFile, UnknownFileType, and URLFile.
getLastChangeDate | ( | ) |
Returns the UNIX-Timestamp of the last change or null if this information is unknown.
Implemented in StandardFile, and UnknownFileType.
getMakeDate | ( | ) |
Returns the UNIX-timestamp of creation of that file
Implemented in StandardFile, and UnknownFileType.
getMimeType | ( | ) |
Returns the mime-type of that FileType-object.
Implemented in StandardFile, UnknownFileType, and URLFile.
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.
Implemented in StandardFile, LibraryFile, UnknownFileType, and URLFile.
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.
Implemented in StandardFile, LibraryFile, UnknownFileType, and URLFile.
getTermsOfUse | ( | ) |
Implemented in StandardFile, and UnknownFileType.
getUser | ( | ) |
Implemented in StandardFile, and UnknownFileType.
getUserId | ( | ) |
The user_id in Stud.IP if the author has Stud.IP account. If it has none, return null.
Implemented in StandardFile, and UnknownFileType.
getUserName | ( | ) |
Return the name of the author as a string.
Implemented in StandardFile, and UnknownFileType.
isDownloadable | ( | $user_id = null | ) |
Determines if a user may download the file.
string | $user_id | The user who wishes to download the file. |
Implemented in StandardFile, and UnknownFileType.
isEditable | ( | $user_id = null | ) |
Determines if a user may edit the file.
string | $user_id | The user who wishes to edit the file. |
Implemented in StandardFile, LibraryFile, and UnknownFileType.
isVisible | ( | $user_id = null | ) |
Determines whether the file is visible for a user.
string | $user_id | The user for which the visibility of the file shall be determined. |
Implemented in StandardFile, and UnknownFileType.
isWritable | ( | $user_id = null | ) |
Determines if a user may write to the file.
string | $user_id | The user who wishes to write to the file. |
Implemented in StandardFile, and UnknownFileType.