ILIAS
release_8 Revision v8.19
|
Access class for file objects. More...
Public Member Functions | |
canBeDelivered (ilWACPath $ilWACPath) | |
![]() | |
_checkAccess (string $cmd, string $permission, int $ref_id, int $obj_id, ?int $user_id=null) | |
Checks whether a user may invoke a command or not (this method is called by ilAccessHandler::checkAccess) More... | |
canBeDelivered (ilWACPath $ilWACPath) | |
Static Public Member Functions | |
static | _getCommands () |
get commands this method returns an array of all possible commands/permission combinations example: $commands = array ( array("permission" => "read", "cmd" => "view", "lang_var" => "show"), array("permission" => "write", "cmd" => "edit", "lang_var" => "edit"), ); More... | |
static | _checkGoto (string $a_target) |
check whether goto script will succeed More... | |
static | _lookupFileSize (int $a_id, bool $by_reference=true) |
static | _getFileExtension (string $a_file_name) |
Gets the file extension of the specified file name. More... | |
static | _isFileHidden (string $a_file_name) |
Returns true, if a file with the specified name, is usually hidden from the user. More... | |
static | _appendNumberOfCopyToFilename ($a_file_name, $nth_copy=null, $a_handle_extension=false) |
Appends the text " - Copy" to a filename in the language of the current user. More... | |
static | _getPermanentDownloadLink (int $ref_id) |
Gets the permanent download link for the file. More... | |
static | _preloadData (array $obj_ids, array $ref_ids) |
![]() | |
static | _getCommands () |
get commands More... | |
static | _checkGoto (string $target) |
check whether goto script will succeed More... | |
static | _isOffline (int $obj_id) |
Type-specific implementation of general status, has to be overwritten if object type does not support centralized offline handling. More... | |
static | _preloadData (array $obj_ids, array $ref_ids) |
Preload data. More... | |
Static Protected Attributes | |
static array | $inline_file_extensions = [] |
Contains an array of extensions separated by space. More... | |
static array | $preload_list_gui_data = [] |
|
static |
Appends the text " - Copy" to a filename in the language of the current user.
If the provided $nth_copy parameter is greater than 1, then is appended in round brackets. If $nth_copy parameter is null, then the function determines the copy number on its own. If this function detects, that the filename already ends with " - Copy", or with "- Copy ($nth_copy), it only appends the number of the copy to the filename. This function retains the extension of the filename. Examples:
Definition at line 209 of file class.ilObjFileAccess.php.
References $DIC, $lng, and _getFileExtension().
Referenced by ilContainerGUI\performPasteIntoMultipleObjectsObject().
|
static |
check whether goto script will succeed
Definition at line 116 of file class.ilObjFileAccess.php.
References $DIC, $ref_id, $type, ilSharedResourceGUI\hasAccess(), and ILIAS\Repository\int().
|
static |
get commands this method returns an array of all possible commands/permission combinations example: $commands = array ( array("permission" => "read", "cmd" => "view", "lang_var" => "show"), array("permission" => "write", "cmd" => "edit", "lang_var" => "edit"), );
Definition at line 85 of file class.ilObjFileAccess.php.
References ilFileVersionsGUI\CMD_UNZIP_CURRENT_REVISION.
Referenced by ilObjFileListGUI\init().
|
static |
Gets the file extension of the specified file name.
The file name extension is converted to lower case before it is returned. For example, for the file name "HELLO.MP3", this function returns "mp3". A file name extension can have multiple parts. For the file name "hello.tar.gz", this function returns "gz".
Definition at line 165 of file class.ilObjFileAccess.php.
Referenced by _appendNumberOfCopyToFilename(), and ilFilePreviewRenderer\supports().
|
static |
Gets the permanent download link for the file.
Definition at line 278 of file class.ilObjFileAccess.php.
References ilLink\_getStaticLink().
Referenced by ilObjFileListGUI\getCommandLink(), and ilObjFileGUI\infoScreenForward().
|
static |
Returns true, if a file with the specified name, is usually hidden from the user.
Definition at line 182 of file class.ilObjFileAccess.php.
Referenced by ilItemGroupItems\getAssignableItems(), ilObjectListGUI\getListItemHTML(), ilContainer\getSubItems(), ilObjFile\isHidden(), and ilExportSelectionTableGUI\parseContainer().
|
static |
int | $a_id |
Definition at line 141 of file class.ilObjFileAccess.php.
Referenced by ilCheckSumOfWorkspaceFileSizesJob\calculateRecursive(), and ilCheckSumOfFileSizesJob\calculateRecursive().
|
static |
ilObjFileAccess::canBeDelivered | ( | ilWACPath | $ilWACPath | ) |
Implements ilWACCheckingClass.
Definition at line 57 of file class.ilObjFileAccess.php.
References ilWACPath\getPath(), ilWACPath\getSecurePathId(), and ILIAS\Repository\int().
|
staticprotected |
Contains an array of extensions separated by space.
Since this array is needed for every file object displayed on a repository page, we only create it once, and cache it here.
Definition at line 36 of file class.ilObjFileAccess.php.
|
staticprotected |
Definition at line 38 of file class.ilObjFileAccess.php.