Documentation

Update

Description and parameters

bool
CRubric::Update(
    int ID,
    array arFields
);

Method modifies a newsletter. Non-static method.

Parameters

ParameterDescriptionAvailable from version
IDNewsletter ID.
arFieldsArray with values "Newsletter" field objects.

Returned values

Returns true on success. Otherwise returns false, and LAST_ERROR class variable with error message.

Example

$rubric = new CRubric;
$arFields = Array(
    "ACTIVE" => ($ACTIVE <> "Y"? "N":"Y"),
    "NAME" => $NAME,
    "SORT" => $SORT,
    "DESCRIPTION" => $DESCRIPTION,
    "LID" => $LID
);
if($ID>0)
{
    if(!$rubric->Update($ID, $arFields))
        echo $rubric->LAST_ERROR;
}

© «Bitrix24», 2001-2024