GetRubricList
Description and parameters
CDBResult
CSubscription::GetRubricList( int ID );
Method returns selection of newsletters for the current subscribed address. Static method.
Parameters
Parameter | Description | Available from version |
---|---|---|
ID | Subscription ID. |
Returned value
Returns CDBResult query result. "Subscription" object fields become available upon fetching from result by CDBResult methods.
- ID - Newsletter ID;
- NAME - Newsletter name;
- SORT - Sorting in list;
- LID - Site identifier;
- ACTIVE - Active newsletter attribute (Y/N).
- VISIBLE - Show in public newsletter list (Y/N).
Example
//array of subscribed categories
function GetRubricArray($ID)
{
$aSubscrRub = array();
if($ID>0)
{
$subscr_rub = CSubscription::GetRubricList($ID);
while($subscr_rub_arr = $subscr_rub->Fetch())
$aSubscrRub[] = $subscr_rub_arr["ID"];
}
return $aSubscrRub;
}
© «Bitrix24», 2001-2024