Bitrix Site Manager

CRubric::GetList

CRubric::GetList(
    $aSort=array(), 
    $aFilter=array()
);

The method GetList returns a filtered list of mailing lists.

Parameters

ParameterDescription
$aSort Array containing the sort criteria entries in the form "field name"=>"direction".

The field name can be the following:
  • NAME - the mailing list name;
  • LID - the site ID;
  • ACT - the mailing list active state;
  • SORT - sort weight;
  • ID - the mailing list ID
  • AUTO - tells the subscription issues are to be generated;
  • VISIBLE - the mailing list is public;
  • LAST_EXECUTED - time of the last generation.
The direction can be one of the following:
  • ASC - ascending;
  • DESC - descending.
For example: 
array("LID"=>"ASC", "NAME"=>"DESC")
$aFilter Array containing the filter entries in the form of "field name"=>"filter value".

The field name can be the following:
  • LID - the site ID;
  • ACTIVE - the mailing list active state;
  • AUTO - tells the subscription issues are to be generated;
  • VISIBLE - the mailing list is public;
  • ID - the mailing list ID.
For example:
array("LID"=>SITE_ID, "ACTIVE"=>"Y")

Return Values

Returns an instance of the CDBResult class. The Mailing list object fields become available after calling one of the CDBResult methods.

Example



<?
//get the site's newsletter categories
$rub = CRubric::GetList(array("SORT"=>"ASC", "NAME"=>"ASC"), 
                        array("ACTIVE"=>"Y", "LID"=>LANG));
while($rub->ExtractFields("r_")):
?>
    <input 
     type="checkbox" 
     name="sf_RUB_ID[]" value="<?echo $r_ID?>"><?echo $r_NAME?><br>
<?
endwhile;
?>