FileUserType
FinalYes
Table of Contents
Constants
- ERROR_COULD_NOT_FIND_ATTACHED_OBJECT = 'DISK_FUT_22002'
- NEW_FILE_PREFIX = 'n'
- TYPE_ALREADY_ATTACHED = 3
- TYPE_NEW_OBJECT = 2
- USER_TYPE_ID = 'disk_file'
Methods
- checkFields() : array<string|int, mixed>
- detectType() : array<string|int, mixed>
- Detect: this is already exists attachedObject or new object
- getAdminListEditHTML() : mixed
- getAdminListEditHTMLMulty() : mixed
- getAdminListViewHTML() : mixed
- getCustomData() : array<string|int, mixed>
- getDBColumnType() : mixed
- getEditFormHTML() : mixed
- getFilterHTML() : mixed
- getItemsInfo() : mixed
- getPublicViewHTML() : mixed
- getSettingsHTML() : mixed
- getTemplateType() : string
- getUserTypeDescription() : mixed
- onAfterCopy() : mixed
- Performs the necessary actions after copying. For example: updates attached id to text.
- onBeforeCopy() : array<string|int, mixed>
- Prepares values before copying.
- onBeforeSave() : mixed
- onBeforeSaveAll() : mixed
- onDelete() : mixed
- onSearchIndex() : mixed
- prepareSettings() : mixed
- setTemplateType() : mixed
- updateText() : string
- Update entity text.
Constants
ERROR_COULD_NOT_FIND_ATTACHED_OBJECT
public
mixed
ERROR_COULD_NOT_FIND_ATTACHED_OBJECT
= 'DISK_FUT_22002'
NEW_FILE_PREFIX
public
mixed
NEW_FILE_PREFIX
= 'n'
TYPE_ALREADY_ATTACHED
public
mixed
TYPE_ALREADY_ATTACHED
= 3
TYPE_NEW_OBJECT
public
mixed
TYPE_NEW_OBJECT
= 2
USER_TYPE_ID
public
mixed
USER_TYPE_ID
= 'disk_file'
Methods
checkFields()
public
static checkFields(mixed $userField, mixed $value[, bool $userId = false ]) : array<string|int, mixed>
Parameters
- $userField : mixed
- $value : mixed
- $userId : bool = false
-
False means current user id.
Return values
array<string|int, mixed>detectType()
Detect: this is already exists attachedObject or new object
public
static detectType(mixed $value) : array<string|int, mixed>
Parameters
- $value : mixed
Return values
array<string|int, mixed>getAdminListEditHTML()
public
static getAdminListEditHTML(mixed $userField, mixed $htmlControl) : mixed
Parameters
- $userField : mixed
- $htmlControl : mixed
getAdminListEditHTMLMulty()
public
static getAdminListEditHTMLMulty(mixed $userField, mixed $htmlControl) : mixed
Parameters
- $userField : mixed
- $htmlControl : mixed
getAdminListViewHTML()
public
static getAdminListViewHTML(mixed $userField, mixed $htmlControl) : mixed
Parameters
- $userField : mixed
- $htmlControl : mixed
getCustomData()
public
static getCustomData(array<string|int, mixed> $userField, int $entityValueId) : array<string|int, mixed>
Parameters
- $userField : array<string|int, mixed>
- $entityValueId : int
Return values
array<string|int, mixed>getDBColumnType()
public
static getDBColumnType(mixed $userField) : mixed
Parameters
- $userField : mixed
getEditFormHTML()
public
static getEditFormHTML(mixed $userField, mixed $htmlControl) : mixed
Parameters
- $userField : mixed
- $htmlControl : mixed
getFilterHTML()
public
static getFilterHTML(mixed $userField, mixed $htmlControl) : mixed
Parameters
- $userField : mixed
- $htmlControl : mixed
getItemsInfo()
public
static getItemsInfo(mixed $itemsList) : mixed
Parameters
- $itemsList : mixed
getPublicViewHTML()
public
static getPublicViewHTML(mixed $userField, mixed $id[, mixed $params = "" ][, mixed $settings = array() ][, mixed $matches = null ]) : mixed
Parameters
- $userField : mixed
- $id : mixed
- $params : mixed = ""
- $settings : mixed = array()
- $matches : mixed = null
getSettingsHTML()
public
static getSettingsHTML(mixed $userField, mixed $htmlControl, mixed $varsFromForm) : mixed
Parameters
- $userField : mixed
- $htmlControl : mixed
- $varsFromForm : mixed
getTemplateType()
public
static getTemplateType(array<string|int, mixed> $params) : string
Parameters
- $params : array<string|int, mixed>
Return values
stringgetUserTypeDescription()
public
static getUserTypeDescription() : mixed
onAfterCopy()
Performs the necessary actions after copying. For example: updates attached id to text.
public
static onAfterCopy(mixed $userField, int $entityId, array<string|int, mixed> $attachedIds, object $entityObject[, bool $userId = false ]) : mixed
Parameters
- $userField : mixed
- $entityId : int
-
Id copied entity.
- $attachedIds : array<string|int, mixed>
-
List new attached id.
- $entityObject : object
-
Entity object for update entity.
- $userId : bool = false
onBeforeCopy()
Prepares values before copying.
public
static onBeforeCopy(mixed $userField, int $newEntityId, array<string|int, mixed> $attachedIds, object $entityObject[, bool $userId = false ]) : array<string|int, mixed>
Parameters
- $userField : mixed
- $newEntityId : int
-
List old attached id.
- $attachedIds : array<string|int, mixed>
-
List new attached id.
- $entityObject : object
-
Entity object for update entity.
- $userId : bool = false
Return values
array<string|int, mixed> —List new attached id to add.
onBeforeSave()
public
static onBeforeSave(mixed $userField, mixed $value[, mixed $userId = false ]) : mixed
Parameters
- $userField : mixed
- $value : mixed
- $userId : mixed = false
onBeforeSaveAll()
public
static onBeforeSaveAll(mixed $userField, mixed $values[, mixed $userId = false ]) : mixed
Parameters
- $userField : mixed
- $values : mixed
- $userId : mixed = false
onDelete()
public
static onDelete(mixed $userField, mixed $value) : mixed
Parameters
- $userField : mixed
- $value : mixed
onSearchIndex()
public
static onSearchIndex(mixed $userField) : mixed
Parameters
- $userField : mixed
prepareSettings()
public
static prepareSettings(mixed $userField) : mixed
Parameters
- $userField : mixed
setTemplateType()
public
static setTemplateType([array<string|int, mixed> $params = [] ]) : mixed
Parameters
- $params : array<string|int, mixed> = []
updateText()
Update entity text.
public
static updateText(mixed $text, string $entity, string|int $entityId, string $fieldName, array<string|int, mixed> $filesIdToUpdate) : string
Parameters
- $text : mixed
- $entity : string
-
String entity id.
- $entityId : string|int
-
Entity id.
- $fieldName : string
-
UF Field name of entity.
- $filesIdToUpdate : array<string|int, mixed>
-
List files ids.