ILIAS
trunk Revision v11.0_alpha-1761-g6dbbfa7b760
|
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... | |
![]() | |
_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 | _shouldDownloadDirectly (int $obj_id) |
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) |
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 | _lookupOnline (int $a_obj_id) |
![]() | |
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 = [] |
Access class for file objects.
Definition at line 29 of file class.ilObjFileAccess.php.
|
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 283 of file class.ilObjFileAccess.php.
References $DIC, $lng, and null.
Referenced by ilContainerGUI\performPasteIntoMultipleObjectsObject().
ilObjFileAccess::_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)
Definition at line 126 of file class.ilObjFileAccess.php.
References $DIC, $lng, $user_id, ilAccessInfo\IL_NO_OBJECT_ACCESS, and ilAccessInfo\IL_STATUS_MESSAGE.
|
static |
check whether goto script will succeed
Definition at line 176 of file class.ilObjFileAccess.php.
References $DIC, and ilSharedResourceGUI\hasAccess().
|
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 74 of file class.ilObjFileAccess.php.
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 240 of file class.ilObjFileAccess.php.
|
static |
Gets the permanent download link for the file.
Definition at line 351 of file class.ilObjFileAccess.php.
References ilLink\_getStaticLink().
Referenced by ilObjFileGUI\buildInfoScreen().
|
static |
Returns true, if a file with the specified name, is usually hidden from the user.
Definition at line 256 of file class.ilObjFileAccess.php.
Referenced by ilItemGroupItems\getAssignableItems(), ILIAS\Export\ExportHandler\Manager\Handler\getObjectIdCollectionBuilderFrom(), ilContainer\getSubItems(), ILIAS\UI\Component\Legacy\Content\ItemSetManager\groupItems(), ilObjFile\isHidden(), and ilExportSelectionTableGUI\parseContainer().
|
static |
Definition at line 221 of file class.ilObjFileAccess.php.
Referenced by ilCheckSumOfWorkspaceFileSizesJob\calculateRecursive(), and ilCheckSumOfFileSizesJob\calculateRecursive().
|
static |
Definition at line 366 of file class.ilObjFileAccess.php.
|
static |
|
static |
Definition at line 199 of file class.ilObjFileAccess.php.
References $DIC, and ilObjFile\CLICK_MODE_DOWNLOAD.
Referenced by ilObjFileListGUI\getCommandLink().
ilObjFileAccess::canBeDelivered | ( | ilWACPath | $ilWACPath | ) |
Implements ilWACCheckingClass.
Definition at line 57 of file class.ilObjFileAccess.php.
|
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.