UserFieldManager implements IErrorable
Table of Contents
Interfaces
Methods
- __construct() : mixed
- Constructor of UserFiedManager.
- belongsToEntity() : bool
- Checks attitude attached object to entity. It is important in right checking in components disk.uf.file, disk.uf.version.
- getAttachedObjectByEntity() : array<string|int, AttachedObject>
- Returns list of attached object which are attached to entity.
- getAttachedObjectById() : AttachedObject|null
- Gets attached object by id (optimization).
- getConnectorDataByEntityType() : array<string|int, mixed>|null
- Gets data which describes specific connector by entity type.
- getConnectors() : array<string|int, mixed>
- Returns full list of available connectors for attached objects.
- getErrorByCode() : array<string|int, Error>
- Getting once error with the necessary code.
- getErrors() : array<string|int, Error>
- Getting array of errors.
- getErrorsByCode() : array<string|int, Error>
- Getting array of errors with the necessary code.
- getFieldsForObject() : array<string|int, mixed>
- Gets values of user fields for file or folder.
- getInputNameForAllowEditByEntityType() : string
- Gets input name for hidden input in disk.uf.file by entity type.
- getInputNameForTemplateView() : mixed
- getUfEntityName() : string
- isLoadedAttachedObject() : bool
- Checks by id of attached object status of loading data in memory (optimization).
- loadBatchAttachedObject() : void
- Preload AttachedObjects.
- loadBatchAttachedObjectInBlogPost() : void
- Preload AttachedObjects in blog posts.
- showEdit() : void
- Shows component disk.uf.file (edit mode).
- showInlineView() : void
- Shows component disk.uf.file (show inline mode).
- showView() : void
- Shows component disk.uf.file (show mode).
- showViewVersion() : void
- Shows component disk.uf.version.
Methods
__construct()
Constructor of UserFiedManager.
public
__construct() : mixed
belongsToEntity()
Checks attitude attached object to entity. It is important in right checking in components disk.uf.file, disk.uf.version.
public
belongsToEntity(AttachedObject $attachedObject, string $entityType, int $entityId) : bool
Parameters
- $attachedObject : AttachedObject
-
Attached object.
- $entityType : string
-
Entity type (ex. sonet_comment).
- $entityId : int
-
Id of entity.
Return values
boolgetAttachedObjectByEntity()
Returns list of attached object which are attached to entity.
public
getAttachedObjectByEntity(string $entity, string|int $entityId, string $fieldName) : array<string|int, AttachedObject>
Parameters
- $entity : string
-
Entity name.
- $entityId : string|int
-
Entity id.
- $fieldName : string
-
Field name.
Return values
array<string|int, AttachedObject>getAttachedObjectById()
Gets attached object by id (optimization).
public
getAttachedObjectById(int $id) : AttachedObject|null
Parameters
- $id : int
-
Id of attached object.
Return values
AttachedObject|nullgetConnectorDataByEntityType()
Gets data which describes specific connector by entity type.
public
getConnectorDataByEntityType(string $entityType) : array<string|int, mixed>|null
Parameters
- $entityType : string
-
Entity type (ex. sonet_comment).
Return values
array<string|int, mixed>|null —Array with two elements: connector class and module.
getConnectors()
Returns full list of available connectors for attached objects.
public
getConnectors() : array<string|int, mixed>
Return values
array<string|int, mixed>getErrorByCode()
Getting once error with the necessary code.
public
getErrorByCode(string $code) : array<string|int, Error>
Parameters
- $code : string
-
Code of error.
Return values
array<string|int, Error>getErrors()
Getting array of errors.
public
getErrors() : array<string|int, Error>
Return values
array<string|int, Error>getErrorsByCode()
Getting array of errors with the necessary code.
public
getErrorsByCode(string $code) : array<string|int, Error>
Parameters
- $code : string
-
Code of error.
Return values
array<string|int, Error>getFieldsForObject()
Gets values of user fields for file or folder.
public
getFieldsForObject(BaseObject $object) : array<string|int, mixed>
Parameters
- $object : BaseObject
-
Target object.
Return values
array<string|int, mixed>getInputNameForAllowEditByEntityType()
Gets input name for hidden input in disk.uf.file by entity type.
public
getInputNameForAllowEditByEntityType(string $entityType) : string
This name will use in process saving user type (disk_file).
Parameters
- $entityType : string
-
Entity type (ex. sonet_comment).
Return values
stringgetInputNameForTemplateView()
public
getInputNameForTemplateView(mixed $entityType) : mixed
Parameters
- $entityType : mixed
getUfEntityName()
public
getUfEntityName(BaseObject $object) : string
Parameters
- $object : BaseObject
Return values
stringisLoadedAttachedObject()
Checks by id of attached object status of loading data in memory (optimization).
public
isLoadedAttachedObject(int $id) : bool
Parameters
- $id : int
-
Id of attached object.
Return values
boolloadBatchAttachedObject()
Preload AttachedObjects.
public
loadBatchAttachedObject(array<string|int, mixed> $ids) : void
Parameters
- $ids : array<string|int, mixed>
-
List of attached objects id.
loadBatchAttachedObjectInBlogPost()
Preload AttachedObjects in blog posts.
public
loadBatchAttachedObjectInBlogPost(array<string|int, mixed> $blogPostIds) : void
Parameters
- $blogPostIds : array<string|int, mixed>
-
List of blog post id.
showEdit()
Shows component disk.uf.file (edit mode).
public
showEdit(array<string|int, mixed> &$params, array<string|int, mixed> &$result[, null $component = null ]) : void
Parameters
- $params : array<string|int, mixed>
-
Component parameters.
- $result : array<string|int, mixed>
-
Component results.
- $component : null = null
-
Component.
showInlineView()
Shows component disk.uf.file (show inline mode).
public
showInlineView(array<string|int, mixed> &$params, array<string|int, mixed> &$result[, null $component = null ]) : void
Parameters
- $params : array<string|int, mixed>
-
Component parameters.
- $result : array<string|int, mixed>
-
Component results.
- $component : null = null
-
Component.
showView()
Shows component disk.uf.file (show mode).
public
showView(array<string|int, mixed> &$params, array<string|int, mixed> &$result[, null $component = null ]) : void
Parameters
- $params : array<string|int, mixed>
-
Component parameters.
- $result : array<string|int, mixed>
-
Component results.
- $component : null = null
-
Component.
showViewVersion()
Shows component disk.uf.version.
public
showViewVersion(array<string|int, mixed> &$params, array<string|int, mixed> &$result[, null $component = null ]) : void
Parameters
- $params : array<string|int, mixed>
-
Component parameters.
- $result : array<string|int, mixed>
-
Component results.
- $component : null = null
-
Component.