div {
font-weight:bold;
}
div {
font-weight: normal;
}
\CAgent::AddAgent( "\\Your\\Module\\SuperClass::superAgent();", "your.module", "N", 10 * 24 * 3600, "", "Y");
\CAgent::RemoveModuleAgents("your.module");
->registerRuntimeField('PRICE', [
'data_type' => \Bitrix\Catalog\PriceTable::class,
'reference' => [
'=this.ID' => 'ref.PRODUCT_ID',
'=ref.CATALOG_GROUP_ID' => new \Bitrix\Main\DB\SqlExpression('?', 1)
]
])
Но ведь почему-то разработчики Битрикса решили от него отказаться?
Выходит нужно использовать старый CIBlockElement::Add() без вариантов?
Есть какой-то аналог Batch Processing от Doctrine?
$query = \Entities\Marketing\PostingTmpTable::query()
->registerRuntimeField('CONTACT', [
'data_type' => '\Bitrix\Sender\ContactTable',
'reference' => [
'=this.CONTACT_ID' => 'ref.ID',
],
// 'join_type' => 'right'
])
->registerRuntimeField('PROPERTY', [
'data_type' => $hlBlockEntity,
'reference' => [
'=this.CONTACT.CODE' => 'ref.UF_EMAIL'
],
// 'join_type' => 'right'
])
;
$arRef = [];
$resultArray = \Bitrix\Highloadblock\HighloadBlockTable::compileEntity('Entity')->getDataClass()::getList([
'select' => ['UF_NAME'],
'filter' => [],
]);
while ($rowArray = $resultObj->fetch()) {
$arRef[$resultArray['UF_XML_ID']] = $resultArray['UF_NAME'];
}
foreach ($arResult['ITEMS'] as $index => $arItem) {
$arResult['ITEMS'][$index]['PROPERTIES']['PROP']['UF_NAME'] = $arRef[$arItem['PROPERTIES']['PROP']['VALUE']];
}
$xmlIds = [];
foreach ($arResult['ITEMS'] as $index => $arItem) {
$xmlIds[] = $arItem['PROPERTIES']['PROP']['VALUE']];
}
$xmlIds = array_unique($xmlIds);
if(!empty($xmlIds)){
$resultArray = \Bitrix\Highloadblock\HighloadBlockTable::compileEntity('Entity')->getDataClass()::getList([
'select' => ['UF_NAME'],
'filter' => ['@UF_XML_ID' => $xmlIds],
]);
while ($rowArray = $resultObj->fetch()) {
$arRef[$resultArray['UF_XML_ID']] = $resultArray['UF_NAME'];
}
}
/(?=[А-Я])/u