Disk
Table of Contents
Constants
- FILE_MASK_HREF = '(file:)?#diskFile([\d]+)'
- FILE_PREFIX_HREF = '#diskFile'
Methods
- getFileInfo() : array<string|int, mixed>|null
- Returns file's info by Disk's file id.
- sanitizeContent() : string
- Check disk's files within content for read access. If not, remove file's marks.
Constants
FILE_MASK_HREF
public
mixed
FILE_MASK_HREF
= '(file:)?#diskFile([\d]+)'
FILE_PREFIX_HREF
public
mixed
FILE_PREFIX_HREF
= '#diskFile'
Methods
getFileInfo()
Returns file's info by Disk's file id.
public
static getFileInfo(int $objectId[, bool $checkRights = true ][, bool $copyInLocalStorage = false ]) : array<string|int, mixed>|null
Parameters
- $objectId : int
-
Disk's object if (file id).
- $checkRights : bool = true
-
True for checking permissions within Disk.
- $copyInLocalStorage : bool = false
-
If file in external folder then copies file in local user storage.
Return values
array<string|int, mixed>|nullsanitizeContent()
Check disk's files within content for read access. If not, remove file's marks.
public
static sanitizeContent(string $content[, string|null $oldContent = null ][, bool &$replaced = false ]) : string
Parameters
- $content : string
-
Content.
- $oldContent : string|null = null
-
Old content (if exists, found old files will not be replaced).
- $replaced : bool = false
-
True if was replaced.