Documentation

Delete

bool
CBlogCategory::Delete(
 int ID
);

The method deletes a category with the ID. Non-static method.

Method parameters

ParameterDescription
ID Category ID.

Returned value

The method returns true if the category was deleted successfully, otherwise returns false.

Examples of use

<?
if(!CBlogCategory::Delete($ID))
{
    echo 'Category deletion error'.$ID;
}
else
    echo 'Category is deleted удалена.';
?>

Deleting all block tags:

CModule::IncludeModule ("blog");
$dbCategory = CBlogCategory::GetList (Array ("ID" => "ASC"), Array ("BLOG_ID" => 5));
while ($arCategory = $dbCategory->Fetch())
{
   CBlogCategory::Delete ($arCategory["ID"]);
}


© «Bitrix24», 2001-2024
Up