\Bitrix\Main\Loader::IncludeModule('highloadblock');
$data = array(
'NAME' => 'Statuses',
'TABLE_NAME' => 'ib_statuses'
);
$result = \Bitrix\Highloadblock\HighloadBlockTable::add($data);
if ($result->isSuccess()) {
$HLBId = $result->getId();
$hlblock = \Bitrix\Highloadblock\HighloadBlockTable::getById( $HLBId )->fetch(); // get the object HL unit
$entity = \Bitrix\Highloadblock\HighloadBlockTable::compileEntity( $hlblock ); // get the working entity
$entity_data_class = $entity->getDataClass(); // get an instance of the class
$entity_table_name = $hlblock['TABLE_NAME']; // assign a variable name HL table
$sTableID = 'tbl_'.$entity_table_name; // add the prefix and eventually formed the name
$arData = Array(
0 => Array(
'UF_NAME' => 'New'
),
1 => Array(
'UF_NAME' => 'On examination'
),
2 => Array(
'UF_NAME' => 'the author on completion'
),
3 => Array(
'UF_NAME' => 'IN implementation'
)
);
foreach ($arData as $item){
$result = $entity_data_class::add($item);
}
}
Find more questions by tags 1C-Bitrix