Answer the question
In order to leave comments, you need to log in
How to remove a HighLoad block using the Bitrix API?
It is necessary to remove the HighLoad block by its name (code). I found the following method, but it is not entirely clear which parameter should be passed:
bxapi.ru/src/?module_id=highloadblock&name=Highloa...
Answer the question
In order to leave comments, you need to log in
You need to get the highload block ID first.
use Bitrix\Highloadblock as HL;
$filter = array(
'select' => array('ID'),
'filter' => array('=NAME' => "CODE_OF_YOUR_HLBLOCK")
);
$hlblock = HL\HighloadBlockTable::getList($filter)->fetch();
if(is_array($hlblock) && !empty($hlblock))
{
HL\HighloadBlockTable::delete($hlblock['ID']);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question