Documentation

Delete

bool
CIBlockSection::Delete(
 int ID
);

The method deletes a section identified by the ID. All child sections and elements are deleted if they are bound to only this section .

Parameters

ParameterDescription
ID Section ID.

Return Values

Returns true on success, or false otherwise.

Example


<?
if (CIBlock::GetPermission($IBLOCK_ID)>='W')
{
    $DB->StartTransaction();
    if (!CIBlockSection::Delete($SECTION_ID))
    {
        $strWarning .= 'Error.';
        $DB->Rollback();
    }
    else
        $DB->Commit();
}
?>
© «Bitrix24», 2001-2024
Up