|
| __construct ($folderdata=null) |
|
| getPermissionString () |
|
| checkPermission ($perm, $user_id=null) |
|
| getIcon ($role=Icon::DEFAULT_ROLE) |
|
| isVisible ($user_id=null) |
|
| isReadable ($user_id=null) |
|
| isWritable ($user_id=null) |
|
| isSubfolderAllowed ($user_id) |
|
| getDescriptionTemplate () |
|
| validateUpload (FileType $uploadedfile, $user_id) |
|
| getEditTemplate () |
|
| getFiles () |
|
| isFileVisible ($fileref_or_id, $user_id) |
|
| isFileDownloadable ($fileref_or_id, $user_id) |
|
| copySettings () |
|
Public Member Functions inherited from StandardFolder |
| __construct ($folderdata=null) |
|
| getIcon ($role=Icon::DEFAULT_ROLE) |
|
| getId () |
|
| __get ($attribute) |
|
| __set ($name, $value) |
|
| isVisible ($user_id) |
|
| isReadable ($user_id) |
|
| isWritable ($user_id) |
|
| isEditable ($user_id) |
|
| isSubfolderAllowed ($user_id) |
|
| getDescriptionTemplate () |
|
| getEditTemplate () |
|
| setDataFromEditTemplate ($request) |
|
| store () |
|
| validateUpload (FileType $file, $user_id) |
|
| getSubfolders () |
|
| getFiles () |
|
| getParent () |
|
| addFile (FileType $file, $user_id=null) |
|
| deleteFile ($file_ref_id) |
|
| createSubfolder (FolderType $foldertype) |
|
| deleteSubfolder ($subfolder_id) |
|
| delete () |
|
| isFileDownloadable ($fileref_or_id, $user_id) |
|
| isFileEditable ($fileref_or_id, $user_id) |
|
| isFileWritable ($fileref_or_id, $user_id) |
|
| getRangeObject () |
|
| getAdditionalColumns () |
|
| getContentForAdditionalColumn ($column_index) |
|
| getAdditionalColumnOrderWeigh ($column_index) |
|
| getAdditionalActionButtons () |
|
| copySettings () |
|
◆ __construct()
__construct |
( |
|
$folderdata = null | ) |
|
◆ availableInRange()
static availableInRange |
( |
|
$range_id_or_object, |
|
|
|
$user_id |
|
) |
| |
|
static |
This method tells if the FolderType implementation can be created in a specific range type.
Some FolderType implementations aren't useful in conjunction with a specific range type. An FolderType implementation therefore must provide this method so that other parts of the file area system can easily check if folders of the FolderType implementation can be placed inside standard folders.
- Parameters
-
string | Object | $range_id_or_object | id or object of type "course", "user", "institute", "message" |
string | $user_id | |
- Returns
- boolean True, if creatable, false otherwise.
Implements FolderType.
◆ checkPermission()
checkPermission |
( |
|
$perm, |
|
|
|
$user_id = null |
|
) |
| |
◆ copySettings()
◆ getDescriptionTemplate()
getDescriptionTemplate |
( |
| ) |
|
returns description of the folder
- Returns
- Flexi | string
Implements FolderType.
◆ getEditTemplate()
returns template form, must not contain opening and closing <form> tags
- Returns
- Flexi | string
Implements FolderType.
◆ getFiles()
◆ getIcon()
Returns the name of the icon shape that shall be used with the FolderType implementation.
- Parameters
-
- Returns
- Icon icon for the FolderType implementation.
Implements FolderType.
◆ getPermissionString()
◆ getTypeName()
Returns a human-friendly representation of the FolderType's name.
- Returns
- string A human-friendly name for the FolderType implementation.
Implements FolderType.
◆ isFileDownloadable()
isFileDownloadable |
( |
|
$fileref_or_id, |
|
|
|
$user_id |
|
) |
| |
◆ isFileVisible()
isFileVisible |
( |
|
$fileref_or_id, |
|
|
|
$user_id |
|
) |
| |
Determines if a user may see the file.
- Parameters
-
FileRef | string | $fileref_or_id | |
string | $user_id | |
- Returns
- bool
◆ isReadable()
isReadable |
( |
|
$user_id = null | ) |
|
Determines if a user may read the content of the folder.
- Parameters
-
string | $user_id | The user who wishes to read the folder's content. |
- Returns
- boolean True, if the user is permitted to read the folder, false otherwise.
Implements FolderType.
◆ isSubfolderAllowed()
isSubfolderAllowed |
( |
|
$user_id | ) |
|
Determines if a user may create a subfolder in this folder.
- Parameters
-
string | $user_id | The user who wishes to create a subfolder. |
- Returns
- boolean True, if the user is permitted to create a subfolder, false otherwise.
Implements FolderType.
◆ isVisible()
isVisible |
( |
|
$user_id = null | ) |
|
Determines if a user may see the folder.
- Parameters
-
- Returns
- boolean
Implements FolderType.
◆ isWritable()
isWritable |
( |
|
$user_id = null | ) |
|
Determines if a user may have write permissions for the folder.
- Parameters
-
string | $user_id | The user who wishes to write into the folder. |
- Returns
- boolean True, if the user is permitted to write into the folder, false otherwise.
Implements FolderType.
◆ validateUpload()
validateUpload |
( |
FileType |
$file, |
|
|
|
$user_id |
|
) |
| |
Validates a file upload.
- Parameters
-
| FileType | file The file to be validated. |
string | $user_id | The ID of the user who uploaded the file. |
- Returns
- string|null : error message or null if it was successful
Implements FolderType.
◆ $must_have_perm
$must_have_perm => 2, 'r' => 4, 'f' => 8] |
|
protected |
◆ $permission
◆ $perms
The documentation for this class was generated from the following file: