Bitrix-D7
23.9
Загрузка...
Поиск...
Не найдено
contactupdateservice.php
1
<?php
2
3
namespace
Bitrix\Sender\Service
;
4
5
use
Bitrix\Sender\ContactTable
;
6
use
Bitrix\Sender\Internals\Dto\UpdateContactDtoCollection
;
7
use
Bitrix\Sender\Internals\SqlBatch
;
8
9
final
class
ContactUpdateService
10
{
18
public
function
updateByCollection
(
UpdateContactDtoCollection
$collection): void
19
{
20
$onDuplicateUpdateFields = [
21
'NAME'
,
22
'BLACKLISTED'
,
23
'DATE_UPDATE'
,
24
];
25
foreach
(SqlBatch::divide($collection->
toArray
()) as $list)
26
{
27
SqlBatch::insert(
28
ContactTable::getTableName
(),
29
$list,
30
$onDuplicateUpdateFields,
31
ContactTable::getConflictFields
(),
32
);
33
}
34
}
35
}
Bitrix\Sender\ContactTable
Definition
contact.php:43
Bitrix\Sender\ContactTable\getConflictFields
static getConflictFields()
Definition
contact.php:603
Bitrix\Sender\ContactTable\getTableName
static getTableName()
Definition
contact.php:53
Bitrix\Sender\Internals\Dto\UpdateContactDtoCollection
Definition
updatecontactdtocollection.php:9
Bitrix\Sender\Internals\Dto\UpdateContactDtoCollection\toArray
toArray()
Definition
updatecontactdtocollection.php:41
Bitrix\Sender\Internals\SqlBatch
Definition
sqlbatch.php:22
Bitrix\Sender\Service\ContactUpdateService
Definition
contactupdateservice.php:10
Bitrix\Sender\Service\ContactUpdateService\updateByCollection
updateByCollection(UpdateContactDtoCollection $collection)
Definition
contactupdateservice.php:18
Bitrix\Sender\Service
Definition
contactlistupdateservice.php:3
modules
sender
lib
service
contactupdateservice.php
Создано системой
1.10.0