Documentation

Update

int
CBlogCategory::Update(
 int   ID
 array arFields
);

THe method modifies parameters of a category with the ID. Non-static method.

Method parameters

ParameterDescription
ID Modified category ID.
arFields Arra of the array("BLOG_ID"=>"blog ID", "NAME"=>"category name") type.

Returned value

The method returns ID of the modified category, if the parameter update was successful. When an error occurs, the method will return false, and exceptions will contain errors.

See Also

Examples of use

<?
$ID = 1;
$arFields = array(
    "BLOG_ID" => 1,
    "NAME" => 'Personal'
);

$updateID = CBlogCategory::Update($ID, $arFields);
if(IntVal($updateID)>0)
{
    echo "Category [".$updateID."] is updated.";
}
else
{
    if ($ex = $APPLICATION->GetException())
        echo $ex->GetString();
}
?>


© «Bitrix24», 2001-2024
Up