Group extends CopyImplementer
Interface CopyImplementer for copy entities.
Table of Contents
Constants
- GROUP_COPY_ERROR = "GROUP_COPY_ERROR"
Methods
- __construct() : mixed
- add() : int|bool
- Adds entity.
- copyChildren() : Result
- Starts copying children entities.
- getErrors() : array<string|int, Error>
- getFields() : array<string|int, mixed>
- Returns entity fields.
- prepareFieldsToCopy() : array<string|int, mixed>
- Preparing data before creating a new entity.
- setChangedFields() : mixed
- setExecutiveUserId() : void
- To copy on agent need user id.
- setFeature() : mixed
- Writes feature implementer to the copy queue.
- setProjectTerm() : mixed
- Setting the start date of a project to update dates in entities.
- setUfIgnoreList() : void
- To avoid copying specific fields, specify a list of fields to ignore.
- setUserFieldManager() : mixed
- To copy uf fields, you must pass the uf field manager.
- setUserGroupHelper() : mixed
- Record helper object to update the list of moderators when copying.
Constants
GROUP_COPY_ERROR
public
mixed
GROUP_COPY_ERROR
= "GROUP_COPY_ERROR"
Methods
__construct()
public
__construct(mixed $executiveUserId) : mixed
Parameters
- $executiveUserId : mixed
add()
Adds entity.
public
add(Container $container, array<string|int, mixed> $fields) : int|bool
Parameters
- $container : Container
- $fields : array<string|int, mixed>
Return values
int|bool —return entity id or false.
copyChildren()
Starts copying children entities.
public
copyChildren(Container $container, int $groupId, int $copiedGroupId) : Result
Parameters
- $container : Container
- $groupId : int
-
Group id.
- $copiedGroupId : int
-
Copied group id.
Return values
ResultgetErrors()
public
getErrors() : array<string|int, Error>
Return values
array<string|int, Error>getFields()
Returns entity fields.
public
getFields(Container $container, mixed $entityId) : array<string|int, mixed>
Parameters
- $container : Container
- $entityId : mixed
Return values
array<string|int, mixed> —$fields
prepareFieldsToCopy()
Preparing data before creating a new entity.
public
prepareFieldsToCopy(Container $container, array<string|int, mixed> $fields) : array<string|int, mixed>
Parameters
- $container : Container
- $fields : array<string|int, mixed>
-
List entity fields.
Return values
array<string|int, mixed> —$fields
setChangedFields()
public
setChangedFields(mixed $changedFields) : mixed
Parameters
- $changedFields : mixed
setExecutiveUserId()
To copy on agent need user id.
public
setExecutiveUserId(int $executiveUserId) : void
Parameters
- $executiveUserId : int
setFeature()
Writes feature implementer to the copy queue.
public
setFeature(Feature $feature) : mixed
Parameters
- $feature : Feature
-
Feature implementer.
setProjectTerm()
Setting the start date of a project to update dates in entities.
public
setProjectTerm(array<string|int, mixed> $projectTerm) : mixed
Parameters
- $projectTerm : array<string|int, mixed>
-
["start_point" => "", "end_point" => ""].
setUfIgnoreList()
To avoid copying specific fields, specify a list of fields to ignore.
public
setUfIgnoreList(array<string|int, mixed> $ufIgnoreList) : void
Parameters
- $ufIgnoreList : array<string|int, mixed>
-
Ignore list.
setUserFieldManager()
To copy uf fields, you must pass the uf field manager.
public
setUserFieldManager(CUserTypeManager $userTypeManager) : mixed
Parameters
- $userTypeManager : CUserTypeManager
-
Uf fields.
setUserGroupHelper()
Record helper object to update the list of moderators when copying.
public
setUserGroupHelper(UserGroupHelper $userGroupHelper) : mixed
Parameters
- $userGroupHelper : UserGroupHelper
-
Helper object.