2namespace Bitrix\Socialnetwork\Copy\Implement;
4use Bitrix\Main\Copy\Container;
5use Bitrix\Main\Copy\CopyImplementer;
8use Bitrix\Socialnetwork\UserToGroupTable;
17 private $userGroupHelper =
null;
26 $this->userGroupHelper = $userGroupHelper;
42 if (!\CSocNetUserToGroup::add($field))
52 $this->result->addError(
new Error(
"Error adding a user to the group", self::GROUP_USER_COPY_ERROR));
57 if ($this->userGroupHelper)
80 if (in_array(
"UF_SG_DEPT", $this->ufIgnoreList))
87 $queryObject = \CSocNetUserToGroup::getList([
"ID" =>
"DESC"],
$filter);
88 while ($userToGroup = $queryObject->fetch())
91 isset($dictionary[
"NEW_OWNER_ID"])
92 && $dictionary[
"NEW_OWNER_ID"] == $userToGroup[
"USER_ID"]
118 unset($field[
"DATE_CREATE"]);
119 unset($field[
"DATE_UPDATE"]);
121 $field[
"SEND_MAIL"] =
"N";
122 $field[
"=DATE_CREATE"] =
$DB->currentTimeFunction();
123 $field[
"=DATE_UPDATE"] =
$DB->currentTimeFunction();
getFields(Container $container, $entityId)
setUserGroupHelper(UserGroupHelper $userGroupHelper)
add(Container $container, array $fields)
const GROUP_USER_COPY_ERROR
copyChildren(Container $container, $entityId, $copiedEntityId)
prepareFieldsToCopy(Container $container, array $fields)
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
while($arParentIBlockProperty=$dbParentIBlockProperty->Fetch()) $errorMessage