◆ __construct()
__construct |
( |
|
$folder = null | ) |
|
◆ __get()
◆ availableInRange()
static availableInRange |
( |
|
$rangeIdOrObject, |
|
|
|
$userId |
|
) |
| |
|
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.
◆ createSubfolder()
{
- Parameters
-
- Returns
- FolderType|null A FolderType instance representing the created subfolder or null on failure.
}
Implements FolderType.
◆ createTopFolder()
static createTopFolder |
( |
Instance |
$instance | ) |
|
|
static |
◆ delete()
{Deletes this folder.
- Returns
- bool True on success, False on failure.
}
Implements FolderType.
◆ deleteFile()
{Deletes a file in this folder.
- Parameters
-
string | $file_ref_id | The ID of the FileRef object of the file that shall be deleted. |
- Returns
- bool True on success, False on failure.
}
Implements FolderType.
◆ deleteSubfolder()
deleteSubfolder |
( |
|
$subfolderId | ) |
|
{Deletes a subfolder in this folder.
- Parameters
-
string | $subfolder_id | The ID of the subfolder that shall be deleted. |
- Returns
- bool True on success, False on failure.
}
Implements FolderType.
◆ findOrCreateTopFolder()
static findOrCreateTopFolder |
( |
Instance |
$instance | ) |
|
|
static |
◆ findTopFolder()
static findTopFolder |
( |
Instance |
$instance | ) |
|
|
static |
◆ 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.
◆ 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.
◆ getId()
{Returns the ID of the folder that is managed from this FolderType instance.
- Returns
- string ID of the folder.
}
Implements FolderType.
◆ getParent()
{Returns the FolderType of the parent folder or null if this is the top folder.
- Returns
- null|FolderType
}
Implements FolderType.
◆ getSubfolders()
{Returns a list of subfolders of this folder.
- Returns
- FolderType[] List of folder objects
}
Implements FolderType.
◆ getTypeName()
{Returns a human-friendly representation of the FolderType's name.
- Returns
- string A human-friendly name for the FolderType implementation.
}
Implements FolderType.
◆ isEditable()
{Determines if a user may have edit permissions for the folder.
- Parameters
-
string | $user_id | The user who wishes to edit the folder. |
- Returns
- boolean True, if the user is permitted to edit the folder, false otherwise.
}
Implements FolderType.
◆ isFileDownloadable()
isFileDownloadable |
( |
|
$fileRefId, |
|
|
|
$userId |
|
) |
| |
{Determines if a user may download the file.
- Parameters
-
string | $file_ref_id | The ID of the FileRef object of a file that shall be downloaded. |
string | $user_id | The user who wishes to download the file. |
- Returns
- boolean True, if the user is permitted to download the file, false otherwise.
}
Implements FolderType.
◆ isFileEditable()
isFileEditable |
( |
|
$fileRefId, |
|
|
|
$userId |
|
) |
| |
{Determines if a user may edit the file.
- Parameters
-
string | $file_ref_id | The ID of the FileRef object of a file that shall be edited. |
string | $user_id | The user who wishes to edit the file. |
- Returns
- boolean True, if the user is permitted to edit the file, false otherwise.
}
Implements FolderType.
◆ isFileWritable()
isFileWritable |
( |
|
$fileRefId, |
|
|
|
$userId |
|
) |
| |
{Determines if a user may write to the file.
- Parameters
-
string | $file_id | The FileRef object of a file that shall be written. |
string | $user_id | The user who wishes to write to the file. |
- Returns
- boolean True, if the user is permitted to write to the file, false otherwise.
}
Implements FolderType.
◆ isReadable()
{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 |
( |
|
$userId | ) |
|
{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()
{Determines if a user may see the folder.
- Parameters
-
- Returns
- boolean
}
Implements FolderType.
◆ isWritable()
{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.
◆ setDataFromEditTemplate()
setDataFromEditTemplate |
( |
|
$request | ) |
|
{gets data from edit form
- Parameters
-
- Returns
- FolderType|MessageBox FolderType instance on success, a MessageBox object with an error message on failure.
}
Implements FolderType.
◆ store()
◆ $folder
The documentation for this class was generated from the following file: