Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
$hlblock = \Bitrix\Highloadblock\HighloadBlockTable::getList(
array("filter" => array(
'TABLE_NAME' => 'НАЗВАНИЕ'
))
)->fetch();
echo $hlblock['ID'];
To solve the problem, you do not need to know the highloadblock's ID and use an additional wrapper function ( GetEntityDataClass($HL_BLOCK_ID )); in your example).
You can get what you need in one line:
It might be worth writing a wrapper function to catch exceptions thrown by the compileEntity method:
function compileEntity($entity): ?Base
{
try {
return Highloadblock\HighloadBlockTable::compileEntity($entity);
} catch (SystemException $systemException) {
// что-нибудь
return null;
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question