Bitrix Site Manager

CRubric::Add

CRubric::Add(
    $arFields
);

The method Add is used to add a new mailing list.

Parameters

ParameterDescription
$arFieldsAssociated array containing the keys and values of the Mailing list object fields.

Return Values

Returns the mailing list ID on success. In case of an error, it returns false and the class variable LAST_ERROR contains the error description.

Example



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